Prompt caching: what a 60% hit rate is actually worth
Caching is the only lever that cuts a token bill without changing the product. It pays for itself after a single reuse, and almost nobody measures the hit rate.
Prompt caching stores the front of your prompt on the provider's side and bills later requests that reuse it at a much lower rate. Every major provider does it, and the economics are similar enough that one formula covers them.
The three prices
- Uncached input — the list price, for tokens the provider has not seen recently.
- Cache read — 10% of the input price on Claude, OpenAI and DeepSeek; 5% on Gemini 4 ($0.20 against $4.00 after December).
- Cache write — 25% more than the input price for a 5-minute cache on Claude and OpenAI's 30-minute window. Gemini's implicit caching has no write fee.
The break-even is easier than it looks. A write costs an extra 0.25 × price per token. Each later read saves 0.90 × price. So 0.25 ÷ 0.90 = 0.28 reads — one reuse pays for the write, and every reuse after that is profit.
What it does to a real bill
Claude Sonnet 5.5, 1,000,000 requests a month, 1,200 input and 400 output tokens, a 25% write premium and no batch:
| Cache hit rate | Input cost | Output cost | Monthly total | Saved |
|---|---|---|---|---|
| 0% | $2,400 | $4,000 | $6,400 | — |
| 30% | $1,716 | $4,000 | $5,716 | $684 |
| 60% | $1,032 | $4,000 | $5,032 | $1,368 |
| 80% | $576 | $4,000 | $4,576 | $1,824 |
| 90% | $348 | $4,000 | $4,348 | $2,052 |
Two things stand out. First, the input line collapses but never disappears: at 90% the remaining 10% is still $348. Second, output is the floor. No amount of caching gets this workload under $4,000, because 400 million output tokens at $10.00 is $4,000. If you need to go lower, shorten the answers or move the model.
What actually gets cached
Caching works on the prefix: system prompt, tool definitions, retrieved documents, conversation history. It does not help if every request starts with something different. The hit rate is therefore a product design number — put the stable material first, the timestamped material last, and never interpolate a user ID into the system prompt.
Measure it before you optimise it: logcache_read_input_tokens(Anthropic),cached_tokens(OpenAI) orcachedContentTokenCount(Gemini) per request for a week. Most teams guess 60% and find 11%.
Where caching hurts
Storage is not always free. Gemini prices context storage separately at $0.50 per million tokens per hour through 2026 — a million tokens cached for a month is $365, which dwarfs the $0.20 read price unless you read it thousands of times. Cache only what you reuse within hours, and let the rest expire.