작은 변화도 비싸
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.