Skip to content

Caching guide

5-minute vs 1-hour cache writes: which pays off?

Anthropic's 1-hour cache write costs 2x input, the 5-minute write 1.25x. When the longer lifetime saves money depends on the gaps between your requests.

· Facts checked October 3, 2026

  • Claude Code

The short answer

Use the 5-minute cache when requests arrive within a few minutes of each other, and the 1-hour cache when the gaps are longer than five minutes but shorter than an hour. The 1-hour write costs more up front, 2 times input instead of 1.25 times, but it avoids paying for a fresh write after every pause.

At a glance

5-minute write1.25x the input price; pays off after one read.
1-hour write2x the input price; pays off after two reads.
Lifetime refreshEvery cache hit restarts the lifetime at no charge.
Claude Code default1-hour cache on a subscription, 5-minute with an API key or while using usage credits.

The gap between requests decides it

Each cache hit restarts the lifetime for free, so in a steady session the 5-minute cache never expires and its cheaper write wins. The 1-hour cache earns its premium only when there are pauses: reading a long diff, a meeting, a slow test run.

Take a 100,000-token context at Claude Sonnet 5 rates and three requests spaced ten minutes apart. With 5-minute caching, every request finds the cache expired and writes again: three writes at $0.25 make $0.75, more than the $0.60 the same requests cost with no caching at all. With 1-hour caching, one write at $0.40 and two reads at $0.02 make $0.44.

The opposite case favors the shorter lifetime. Ten requests fired within a few minutes of each other cost $0.43 with 5-minute caching, one write and nine reads, against $0.58 with 1-hour caching and $2.00 with no caching. When nothing pauses, the cheaper write is simply cheaper.

What Claude Code chooses for you

Claude Code manages caching itself. On a Claude subscription, the main conversation uses the 1-hour cache, which fits the stop-and-start rhythm of real coding. With an API key, and while a subscriber is drawing on usage credits, it uses the 5-minute cache.

That switch matters after hitting a limit. If you continue on usage credits and work in bursts with long breaks, more of each break ends in a rewrite. Keeping sessions focused, or finishing a task before stepping away, keeps those rewrites rare. The guide to hitting the limit covers the usage credit side.

Checking the result

Try your own spacing in the cache savings calculator, which takes 5-minute and 1-hour writes as separate inputs. everyaitoken prices both write types separately from your Claude Code history, so a day with many expired caches shows up as lower savings or as overhead. For the case where caching loses money outright, read when prompt caching costs more.

Your own numbers

See what your AI coding really costs.

everyaitoken reads Claude Code, Codex, Cursor, OpenRouter, Gemini CLI, and OpenCode on your Mac. It shows limits with reset times, API-equivalent cost, and what caching saved or cost, in the menu bar and 17 widgets. $9 once.

FAQ

Questions

How much does Anthropic's 1-hour cache cost?

A 1-hour cache write costs 2 times the base input price, against 1.25 times for a 5-minute write. Reads cost the same either way, 0.1 times input on most models.

Does a cache hit extend the cache lifetime?

Yes. Anthropic refreshes the cache at no extra cost each time cached content is used, so a busy session keeps even a 5-minute cache alive.

Which cache does Claude Code use?

The 1-hour cache for the main conversation on a Claude subscription, and the 5-minute cache with an API key or while a subscriber uses usage credits.

Sources

Checked October 3, 2026. Plans and limits change; the linked pages are the authority.

  1. Anthropic: Prompt caching
  2. Claude Code docs: Manage costs effectively