You enabled prompt caching, the hit rate is 92%, and the bill barely moved. That is not a bug. A cache hit discounts input tokens, but it arrives with a write premium and a time-to-live clock, and on Amazon Bedrock those two numbers can eat the saving before you notice.
It covers Bedrock's three cache token classes, the Gemini context caching model that works almost the opposite way, what OpenRouter does to both, and the microeval habit that stops you freezing a bad prompt behind a cache. Every figure is reproducible in the AI cost calculator.

Ignore the marketing percentage. A cached prompt has three costs:
Most teams model the middle number and ignore the third, which is how a 90% discount becomes a 4% invoice reduction.
Bedrock bills the same token classes as the Anthropic API. What changes is where the cache lives and which models support it. Here is Claude Sonnet 5 at $2.00 per million input and $10.00 per million output:
| Token class | Multiplier | Per 1M tokens | When you pay it |
|---|---|---|---|
| Uncached input | 1.00× | $2.00 | Every token outside the cached prefix |
| Cache write | 1.25× | $2.50 | Once per prefix per five-minute window |
| Cache read | 0.10× | $0.20 | Every hit, for the cached tokens only |
| Output | — | $10.00 | Every generated token, cache or not |
Five rules, each with a billing consequence:
Take a support assistant on Claude Sonnet 5: a 40,000-token prefix (system prompt, tool definitions, policy corpus), 2,000 tokens of conversation per request, 500 output tokens, 1,200 requests a day for 30 days — 36,000 requests a month. The five-minute cache is rebuilt 8,640 times a month; the one-hour cache, 720 times.
| Line item | No caching | 5-minute TTL | 1-hour TTL |
|---|---|---|---|
| Cache writes | — | $864 | $115 |
| Cache reads | — | $288 | $288 |
| Variable input | $3,024 | $144 | $144 |
| Output | $180 | $180 | $180 |
| Total | $3,204 | $1,476 | $727 |
Writes are 58% of the cached bill: the prefix is rebuilt 288 times a day even though it never changes. A one-hour TTL writes 12× less often and, even at twice the write rate, is the cheapest policy by a wide margin.
The monthly model:
monthly = N x (P x r_read + V x r_in + O x r_out)
+ W x P x r_write
N = requests per month P = cached prefix tokens
V = variable input tokens O = output tokens
W = cache writes per month r_* = rate per token
The break-even is simpler still. A write costs $0.50 per million tokens above base; each read saves $1.80. Caching pays for itself on the first re-read inside the TTL. The real question is how often you pay to rebuild it.
Google solves the same problem twice, with opposite cost shapes.
Implicit caching is automatic. Send the prompt as usual; Google detects a repeated prefix and bills cached tokens at the cached rate — $0.075 against $0.75 per million on Gemini 3.8 Flash, a 90% discount in the October 2026 rate card. No write premium, no storage fee, no API change. The catch: the hit rate is Google's decision, not yours.
Explicit caching is a resource you create with a token count and a TTL. You pay cached rates on every read plus storage per token-hour, with a minimum billing window. In exchange the cache lives exactly as long as you say — which matters when traffic is bursty.
Run the support workload through Gemini 3.8 Flash at an 80% implicit hit rate and input falls from $1,134 to $356, with output unchanged at $68: $1,202 becomes $424, a 65% cut. At a 100% hit rate it drops to $230. No writes, no TTL arithmetic — which is why implicit caching wins when reuse is unpredictable.
OpenRouter is a pass-through: you pay upstream token rates plus a fee on credit top-ups, not a per-token markup. That is neutral for caching until routing moves your request.
A prompt cached on one provider is not cached on another, nor in a different region of the same one. An auto-router optimising for price or latency will happily send request 2 elsewhere, miss, and pay a fresh write. Three rules prevent it:
A microeval is a small, fast test set — 20 to 100 cases — with deterministic checks, run on every prompt change. It is a regression test for the task you ship: did extraction still return valid JSON, did the classifier still pick the right label, did the answer still cite the right clause.
Caching raises the stakes. Once a prefix is cached it is frozen: system prompt, tool schemas and few-shots become a paid, versioned artefact. Changing one word invalidates the cache and forces a fresh write on every route. Find out that the new wording broke extraction before it costs money.
Thirty cases at 3,000 input and 500 output tokens cost about $0.33 per run — cheaper than one bad cache write.
Four inputs decide the answer: prefix size, requests, cache policy and output length. The rest is arithmetic that changes with every provider update.
You pay 1.25× the base input rate to write a prefix, 0.10× to read it, and nothing extra for the five-minute cache. On Claude Sonnet 5 that is $2.50 per million written tokens and $0.20 per million read tokens.
It depends on reuse. Gemini's implicit cache has no write premium, so it wins on irregular traffic. Bedrock's explicit cache wins when a large prefix is reused continuously.
Yes, as a pass-through. Whether a request hits depends on the provider and region the router selects, so pin the provider order and verify cached token counts in the usage object.
A small deterministic test set — usually 20 to 100 cases — run on every prompt or model change to catch regressions in one task. They cost cents per run and reveal quality and cost before you freeze a prompt behind a cache.
Multiply requests by cached input, uncached input and output tokens at their rates, then add writes: requests × prefix × write rate ÷ TTL windows. The free calculator handles all four terms, including long-context and batch modifiers.
Your next step is one number: how many times per month your cache is rebuilt. If it is more than your request count divided by ten, the TTL costs more than the model. Run your prefix through the free AI cost calculator.