A cache that never hits costs more than no cache at all

by•

I’ve been digging into prompt caching for a write-up, and the part that surprised me most is that writing to the cache costs more than normal input. On Claude, a 5-minute cache write is 1.25x the input rate, and the 1-hour one is 2x. OpenAI started charging for writes too with GPT-5.6, so the old “just turn it on, it’s free” advice doesn’t hold there anymore.

So if anything at the top of your prompt changes on every call (a timestamp, the user’s name, a request ID), every request writes a fresh cache entry that nothing ever reads back. You pay the premium and get nothing for it.

I ran the numbers on a 10k-token shared prompt on Sonnet 5 at 5,000 requests a day:
no caching: about $100/day
caching that never hits: about $125/day
caching that actually works: about $10/day

And nothing errors. Responses look the same, tests pass, the bill just creeps up.

The check that catches it is pretty boring: compare cache writes to cache reads for each feature. If writes are roughly equal to your request count, something near the top of the prompt keeps changing.

The usual culprits I found were dates in the system prompt, tool definitions changing between calls, and trimming or summarizing chat history. Curious what else people have seen quietly break their cache.

5 views

Add a comment

Replies

Be the first to reply

Have a question or a thought to share? Add a comment above to start the conversation.