Prompt caching is marketed as a discount, but the first thing it does to your invoice is add a surcharge. Before a single cached read lands at 0.1× base, you pay a write premium — and if your prefix never gets re-read, that premium is the whole story.
Surcharge before savings: the 1.25× cold-start cost across Anthropic, OpenAI, and Gemini

Every major provider bills the first cache write above the uncached rate. Anthropic charges 1.25× base input per token on its default 5-minute TTL and 2× on the 1-hour TTL; a read costs 0.1× base . On Claude Opus 4.8 ($5/MTok base) that is $6.25/MTok for a 5-minute write, $10/MTok for a 1-hour write, and $0.50/MTok for a read . OpenAI's GPT-5.6 family bills cache writes at roughly 1.25× uncached input and reads near 0.1× . Gemini explicit caching adds per-hour storage rent per 1M cached tokens on top of the discounted read rate .
Quick Answer: Cache writes cost more than an ordinary call — 1.25× base input on Anthropic (5-min TTL) and OpenAI's GPT-5.6 family, 2× for Anthropic's 1-hour TTL. Break-even is about 1.4 reads per write, so a prefix must be re-read at least twice before caching turns net-positive.
| Operation (Claude Opus 4.8, $5/MTok base) | Rate |
|---|---|
| Cache write — 5-min TTL (1.25×) | $6.25/MTok |
| Cache write — 1-hour TTL (2×) | $10.00/MTok |
| Cache read (0.1×) | $0.50/MTok |
Because a write runs about 1.25× an uncached call, break-even sits near 1.4 reads — you need at least two successful hits per write before the prefix pays for itself . And the ceiling is lower than the headline: a 2026 DeepResearchBench evaluation (500+ agent sessions, 10,000-token system prompts) measured best-mode savings of 41–80% across OpenAI, Anthropic, and Google — not 90% — because output tokens and tool calls are unaffected by caching and absorb the rest .
Why cache misses occur: minimum token counts, prefix invalidation, and TTL expiry

A cache miss means you paid full price — or the 1.25× write premium — for a prefix you expected to read at 0.1×. Misses are not random; they come from three structural rules that fire silently, with no error and no warning in the response. Knowing the rules is the difference between a measured discount and a surcharge you never see coming.
The first rule is a minimum-length floor. Below it, caching never activates and every token bills at full input price. OpenAI requires at least 1,024 tokens and reports cached_tokens: 0 for anything shorter. Anthropic's floor varies by model: 1,024 tokens for Opus 4.8, Sonnet 5, 4.6, and 4.5, but 4,096 for Opus 4.6/4.5 and Haiku 4.5 . Bedrock mirrors the same per-model 1,024- or 4,096-token values . Short classification calls, small RAG snippets, and one-line support-chat turns therefore never cache even when cache_control is set — the request runs, but the cache write is silently declined.
The second rule is exact-prefix matching, not semantic matching. A single injected timestamp, a reordered JSON key, a toggled tool definition, or an image-detail change anywhere before the breakpoint forces a full-price miss . Anthropic's invalidation cascades hierarchically — tools → system → messages — so adding one MCP connector rewrites the entire prefix at the 1.25× write rate .
The third rule is TTL expiry. Default lifetime is 5 minutes on both Anthropic and OpenAI, refreshed on each successful read . A 5–60 minute gap in human-in-the-loop chat or an async agent lets the entry go cold, so the next turn re-enters at the write premium instead of 0.1×. One routing limit compounds this: OpenAI advises keeping traffic under 15 requests per minute per prompt_cache_key — above that, requests may route to different backends and miss despite an identical prefix, so high-QPS callers must partition across keys with a stable mapping.
Ordering prompt sections for reliable cache qualification

Reliable cache qualification comes from ordering, not from toggling the feature on: place static content first and dynamic content last so only the stable region hashes identically on every call. Put the system prompt, frozen instructions, and tool definitions at the top of the request, and push per-user context, retrieved chunks, and conversation history below the final breakpoint. Boundary placement is the variable that moves the invoice. On DeepResearchBench, caching only the system prompt improved GPT-4o time-to-first-token by 30.9%, while naive full-context caching that pulled dynamic tool results into the prefix produced an 8.8% TTFT regression .
Freeze tool definitions across turns. Appending a per-session MCP connector or toggling web search or citations above the breakpoint rewrites the entire cached prefix at the 1.25× write rate and cascades invalidation down the tools → system → messages hierarchy . Strip timestamps, session IDs, user names, and tenant-personalization strings out of the prefix region entirely; inject them only after the last cache_control breakpoint, where they cannot alter the prefix hash.
Set the control explicitly. Anthropic supports up to four cache_control breakpoints with a 20-block lookback for automatic prefix checking ; OpenAI keys reliable matching on prompt_cache_key ; Gemini implicit caching is on by default only for Gemini 2.5+ models .
"Strategic boundary control — caching only the stable system prompt or excluding dynamic tool results — proved more reliable than naive full-context caching," — DeepResearchBench evaluation (source: OpenAI Cookbook).
Instrumenting cache efficiency across Anthropic, OpenAI, and Gemini
You cannot manage a cache you cannot see, and every provider hides the entry cost in a different usage field. On Anthropic, cache_creation_input_tokens (the write, billed at 1.25× base), cache_read_input_tokens (reads at 0.1× base), and input_tokens are additive — sum all three for true total input, and inspect each separately to tell which portion was an entry cost versus a saving . On OpenAI, read usage.prompt_tokens_details.cached_tokens . On Bedrock, inputTokens covers only non-cached input, so add cacheReadInputTokens plus cacheWriteInputTokens for a real total . Gemini surfaces implicit-cache hits in its usage-metadata token counts .
The reason to instrument rather than assume: 164k cached tokens (84k system + 80k conversation history) cost ~$0.62 as a cold-start write but ~$0.062 on a subsequent read — and any session with a gap longer than the 5-minute TTL pays the full $0.62 again on the next turn .
"System-prompt-only caching improved GPT-4o time-to-first-token by 30.9%, while naive full-context caching produced an 8.8% regression," — DeepResearchBench evaluation (source: OpenAI Cookbook).
The takeaway (결): reach for Anthropic's 1-hour TTL — which doubles the write to 2× base — only when telemetry confirms the prefix outlives 10 minutes between turns . A/B system-only versus full-context boundary placement per model before you treat either as your default. Prompt caching is a measured workload optimization validated against your own usage fields, not a standing discount.
Frequently asked questions
Does prompt caching always lower my API invoice?
No. Each new cache entry is billed at a premium before you see any discount — roughly 1.25× base input on Anthropic's default 5-minute TTL and on OpenAI's GPT-5.6-family writes . Since a read costs about 0.1× base, break-even sits near 1.4 reads, so you need at least two hits per entry to go net-positive . Workloads that rotate context every call — per-query RAG, one-shot classification — pay the entry surcharge repeatedly with no offsetting savings.
What is the minimum prompt length for caching to activate?
It is model-dependent. OpenAI requires at least 1,024 tokens and reports cached_tokens: 0 below that floor . Anthropic's minimum ranges from 512 to 4,096 tokens by model — 1,024 for Opus 4.8, Sonnet 5, 4.6 and 4.5; 4,096 for Opus 4.6/4.5 and Haiku 4.5 . Below the floor, inference runs normally but caching silently declines with no error — cache_creation_input_tokens stays zero in the usage response, so the miss is invisible unless you inspect it.
Why does injecting a timestamp into my system prompt break cache hits?
Because prefix matching is exact, not semantic. A single changed character anywhere before the cache_control breakpoint produces a full-price miss . Anthropic's invalidation is also hierarchical — a change in tools invalidates system and messages downstream . Timestamps, session IDs, user names, and per-tenant strings must sit after the final breakpoint, never inside the static prefix region.
How long does a cached prefix survive between requests?
Anthropic's default TTL is 5 minutes, reset on each read, with an optional 1-hour TTL that doubles the write to about 2× base . OpenAI's GPT-5.6-family entries stay eligible for at least roughly 30 minutes of inactivity, and manual clearing is unavailable . Any session gap longer than the TTL forces the next turn to re-enter at write-premium rates — common in human-in-the-loop chat and async agent patterns.
Which response fields tell me whether a request was a cache hit or a cold entry?
Inspect the usage object rather than assuming a hit rate. Anthropic separates cache_creation_input_tokens (cold entry) from cache_read_input_tokens (hit) . OpenAI reports usage.prompt_tokens_details.cached_tokens . Bedrock exposes cacheReadInputTokens and cacheWriteInputTokens — note its inputTokens counts only non-cached input, so sum all three for a true total . Gemini surfaces implicit-caching hit counts in usage metadata .
Enjoyed this article? Subscribe to get new stories by email whenever they're published.