C.W.K.
Stream
Lesson 02 of 05 · published

Cache Buster: Top 5

~23 min · cache-busting, timestamps, tool-schemas

Level 0Window Watcher
0 XP0/50 lessons0/13 achievements
0/100 XP to next level100 XP to go0% complete

작은 변화도 비싸

Exact prefix matching은 무해해 보이는 차이가 cache hit 파괴 가능 — 위의 timestamp, 랜덤 request ID, 불안정한 JSON key 순서, 재생성된 tool schema, 변하는 example. 비싼 부분은 변동 콘텐츠 자체 X — 그 변동 콘텐츠를 reusable prefix 끝나기 전에 두는 게 비싸.

Top 5 cache buster

1. 첫 줄의 timestamp나 request ID. 2. Non-deterministic key 순서로 재생성된 tool schema. 3. Request마다 re-shuffle되는 example. 4. Rule 위 'tip of the day'나 rotating banner. 5. Prefix 영역 안 rule section에 사용자 이름이나 현재 시각 들어간 user-facing welcome message.

Volatility 명백하게

모든 변하는 material을 명확한 tail section 아래. Timestamp 필요하면 거기. Tool schema 변하면 의도적으로 version하고 unsorted key가 silently bytes 바꾸게 두지 말고 version field bump.

Code

흔한 cache buster·yaml
cache_busters:
  - "timestamp in first line"
  - "random request id before tool schemas"
  - "unsorted JSON schema keys (Python dict ordering quirk)"
  - "rewritten examples every request"
  - "changing image detail parameter"
  - "user name interpolated into rules section"
JSON schema 안정화·python
import json
schema_text = json.dumps(SCHEMA, sort_keys=True, indent=2)
# Now every request produces byte-identical schema text -> cache hit.

External links

Exercise

Prompt나 request builder에서 cache buster 셋 찾아 tail로 옮기거나 stable하게.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.