The 5-Minute Cache Cliff Is a Default, Not a Limit

A Requesty chart shows Claude's cache hit rate falling from 96% to 9% after a five-minute pause. The drop is real, and it is a setting. Anthropic keeps a cache entry for five minutes unless the request asks for an hour. On our own Claude Code sessions, where the client asked for the hour, calls that came back after pauses of 10 to 42 minutes still read 99.9% of their input from cache. One account and 458 calls, so a mechanism check, not a benchmark. Here is the measurement, what a miss costs, and when the longer lifetime pays for itself.

Published 2026-11-30 by Dor Amir on the Nadir blog.

Filed under Caching.

A chart with a real cliff in it

Requesty published a chart titled "Pause for 5 minutes and Claude's cache hit rate falls from 96% to 9%." It plots the share of input tokens read from cache against the time since the session's previous call, one line per provider. The Claude line drops at the five-minute mark and stays down.

The number is believable. It is also a description of a setting. Anthropic's prompt cache keeps an entry for five minutes unless the request asks for longer, so traffic that sends the default loses its cache at five minutes by construction. The chart shows what callers chose. It does not show what Claude can do.

What the setting is

Every cache breakpoint carries a lifetime: {"type": "ephemeral"} for five minutes, or {"type": "ephemeral", "ttl": "1h"} for an hour. Three rules decide the bill. Source: Anthropic, "Prompt caching"

So the hour costs an extra 0.75x of the input price on every token written. It earns that back only when a pause of 5 to 60 minutes would otherwise have forced a re-write.

What we measured

We ran the same cut on our own traffic: Claude Code sessions sent through Nadir's coding proxy from one account, ours, between October 15 and November 5, 2026. That is 458 calls in 39 sessions and 39.4 million input tokens.

Hit rate below is cache-read tokens divided by input tokens, for calls that used the same model as the call before them. The gap is measured from the start of one call to the start of the next.

Gap since the previous callCallsHit rate
Under 1 minute35294.9%
1 to 3 minutes1798.4%
3 to 5 minutes2195.0%
5 to 10 minutes1not usable, a 38-token call
10 to 30 minutes599.9%
30 to 60 minutes199.9%
Over 60 minutes30%

There is no cliff at five minutes. Taken together, calls under five minutes apart read 95.1% of their input from cache. Six calls, from two sessions, came back after pauses of 10 to 42 minutes, carrying prefixes of 21,000 to 161,000 tokens, and each read at least 99.5% of its input from cache. The cache died where a one-hour entry dies: the three calls that followed pauses of roughly 3, 4 and 17 hours re-wrote everything.

The reason is that the client asked for the hour, and it asked because of how the sessions were billed. Claude Code requests the one-hour lifetime only on a Claude subscription within the plan's included usage. On an API key, a cloud provider, or usage credits, it requests five minutes. Source: Claude Code docs, "Prompt caching" Most of our calls were billed to a subscription.

Our gateway's logs show the same split. On 59 turns that Claude Code sent with an API key, every cache write was a five-minute write. On the subscription turns where the gateway recorded the lifetime, every write was a one-hour write. Same provider, same client, same kind of pause as the chart. The setting is what differs, and traffic that reaches a provider with an API key gets five minutes unless the caller asks for more.

What a miss costs, and when the hour pays

Take a 160,000-token prefix on Claude Opus 5.5, the size of the long sessions above, at $4 per million input tokens. Source: Anthropic, "Pricing"

Next call after a pauseRate for the prefixCost
Cache hit$0.20 / M$0.032
Miss, re-written for five minutes$5.00 / M$0.80
Miss, re-written for one hour$8.00 / M$1.28

A miss costs 25 times a hit. Writing those 160,000 tokens for an hour instead of five minutes costs $0.48 more, and one avoided miss saves $0.77. So a single pause of 5 to 60 minutes late in a session pays for the hour. A session whose calls never sit more than five minutes apart pays the premium and gets nothing for it.

For a person in the loop, that pause is ordinary: reading a diff, a meeting, lunch. For a headless agent loop it almost never happens, and the five-minute default is the right choice.

Where the cache went in our own sessions

Pauses were not the main leak. Of 39.4 million input tokens, 92% were read from cache. Three things forced a full prefix write:

A router that switches models writes a cold prefix just as surely as a pause does, which is why a routing decision has to price the cache. Nadir's decision endpoints take the session's cache state, including the declared lifetime and the seconds since the last request, and treat the cache as cold once that lifetime has passed. A pause past expiry is the one moment a model switch costs nothing extra. Nadir does not change your cache lifetime and does not send keep-alive requests.

What to do with this

  1. Measure your own gaps before touching the setting. Per session, record the time between calls and the share of calls that land 5 to 60 minutes after the previous one.
  2. For interactive sessions with large prefixes, ask for the hour. In Claude Code on an API key or a cloud provider, set promptCacheTtl to 1h, or set the CLAUDE_CODE_PROMPT_CACHE_TTL environment variable, in v2.1.242 or later. For agent loops and steady traffic, keep five minutes.
  3. Read the write split the API returns. usage.cache_creation breaks cache writes into five-minute and one-hour tokens, which tells you which lifetime your client is really sending.
  4. On models with very cheap reads, compare a keep-alive against the hour. Anthropic documents re-sending the request with max_tokens: 0 to refresh the entry for the price of a read.

Limits

This is one account, ours. Of 458 calls, 14 came after a gap of four minutes or more, and the six long-pause hits come from two sessions, so the long-gap rows are counts, not a curve. Most calls were billed to a subscription. Our API-key evidence is the write lifetime on 59 turns over two days. Those sessions had no same-model pause of 5 to 60 minutes, so we did not observe the drop itself on API-key traffic. We did not test the other providers on the chart and make no claim about them. Our Codex sample has three same-model calls after a pause, too few to read.

The conclusion does not rest on the sample size. It rests on the mechanism: a five-minute entry cannot be read 42 minutes later, and ours were.

More on caching

Pages on this site

Machine-readable summaries of this site: llms.txt and llms-full.txt.