The full answer
A prompt cache only matches an identical prefix, so look for whatever makes the start of each request differ. In order: is anything dynamic near the top (a timestamp, a user name, a request ID in the system prompt)? Are tools or their order changing between calls? Is the prompt long enough to be cached at all? Do requests come often enough to beat the cache lifetime? And is the cache marker, on Claude, placed after the shared part?
1. Read the usage fields first
| Provider | Field that shows a hit | Field that shows a write |
|---|---|---|
| Claude | cache_read_input_tokens | cache_creation_input_tokens |
| OpenAI | usage.prompt_tokens_details.cached_tokens | (automatic) |
Writes on every call and no reads means the prefix changes every time. No writes at all means nothing was eligible.
2. The usual causes
| Symptom | Cause | Fix |
|---|---|---|
| Writes every call, never reads | A date, ID or user field in the system prompt | Move it to the last user message |
| Hits drop after a deploy | Tool list built from a dict or set, order changes | Sort tools; keep definitions byte-identical |
| No caching at all | Prompt shorter than the minimum (for example 1,024 tokens on OpenAI) | Cache only long shared prefixes |
| Hits at peak, misses at night | Gaps longer than the cache lifetime (5 minutes by default on Claude) | Use the 1-hour cache, or accept misses |
| Claude: no reads despite stable text | cache_control placed before the part that repeats, or on the changing turn | Put the breakpoint at the end of the shared block |
| OpenAI: low hits across many servers | Requests spread over machines | Set prompt_cache_key per shared prefix |
3. Lay the prompt out for caching
[tools] [system prompt] [examples, documents] | cache here | [conversation] [new question]
never changes ........................................ changes every call
4. Prove it
Send the same request twice within a minute and compare usage. If the second still shows no read, diff the 2 raw request bodies: the first byte that differs is the bug.
See Prompt Caching, and the prompt caching calculator for what a fixed cache saves.
What interviewers want: the prefix rule, reading the usage fields before guessing, dynamic content near the top as the first suspect, tool order, the minimum length and the lifetime, and a 2-request test with a diff of the bodies.
Last updated 22 October 2026
Sources