PROMPT CACHING · UPDATED JULY 2026

Anthropic's cache default is 5 minutes, not 1 hour.

That's straight from Anthropic's own documentation, and it hasn't changed. But a lot of developers — including, it appears, Anthropic's own Claude Code — have assumed otherwise. Here's the actual mechanics, what really happened in March 2026, and how to get the 1-hour tier when you want it.

The mechanics, confirmed from the source

Anthropic's prompt caching has exactly two TTL tiers. Neither is applied unless you set it — there is no ambient “it depends on your usage” behavior.

TierHow you request itWrite costRead cost
5 minutes (default)Automatic — any cache_control breakpoint with no ttl specified1.25× base input price0.1× base input price
1 hourExplicit — {"type": "ephemeral", "ttl": "1h"}2× base input price0.1× base input price

Anthropic's own recommendation: if a prompt is reused more often than every 5 minutes, keep the 5-minute tier — it refreshes at no extra charge on reuse. If it's reused less often than every 5 minutes but more than once an hour, the 1-hour tier's 2× write cost is usually cheaper than repeatedly eating a full write on a cold cache. Anthropic's prompt caching docs.

What actually happened in March 2026

In April 2026, a detailed community investigation — session-log analysis published as a GitHub issue against the claude-code repo — reported that Claude Code's own cache-tier request behavior had shifted. Their data, from 119,866 API calls across two independent machines, showed a clear pattern: 1-hour cache writes consistently present for 33+ straight days (Feb 1 – Mar 5), then a transition, then 5-minute writes dominant from March 8 onward. No changelog entry, blog post, or deprecation notice accompanied it.

Worth being precise about:the community evidence is strong for what Claude Code itself was requesting — but it's reverse-engineered from session logs, not an Anthropic-confirmed changelog entry. What's independently confirmed, directly from Anthropic's own current docs, is that the API's documented default has been 5 minutes with 1-hour as an opt-in this whole time— that contract hasn't moved. What most likely changed is Claude Code's own internal choice of which tier to request by default, not the API itself.

Reported impact for affected Claude Code sessions: a 20–32% increase in cache creation costs and a real spike in quota consumption for long-running sessions where the cache now expires before it gets reused.

Why this matters even if you never touch Claude Code

If you're calling the Anthropic API directly from your own application, the actual lesson isn't about Claude Code at all — it's that 5 minutes has always been the default, full stop, and it's easy to build an application that quietly assumes otherwise. A conversation that goes idle for six minutes between turns, a background job that reuses a system prompt every twenty minutes, a multi-step agent loop with a slow tool call in the middle — all of these silently miss the cache and eat a full write, unless the code explicitly asked for ttl: "1h".

The fix is the same one line either way:

requesting the 1-hour tier explicitly
{
  "type": "text",
  "text": "<your long, reused system prompt>",
  "cache_control": { "type": "ephemeral", "ttl": "1h" }
}

How SlashSpend handles this

Two things, both already shipped — neither is a workaround for Anthropic's pricing, just a shorter path to the same explicit request.

  • X-SlashSpend-Cache-Tier: 1h

    Send this header on a request that already carries a cache_control breakpoint, and SlashSpend sets ttl: "1h" on it for you — no request-body change on your end. Set the header to 5m to go the other way. It only touches requests to Anthropic that already have cache_control present; everything else passes through untouched.

  • Native-path preservation

    Anthropic's OpenAI-compatible endpoint doesn't honor cache_control breakpoints at all. SlashSpend detects cache_control in your request and routes it through Anthropic's native Messages API instead — so the discount survives the proxy rather than getting silently dropped by an OpenAI-shaped translation layer.

Frequently asked questions

Is Anthropic's prompt cache default 1 hour or 5 minutes?

5 minutes, per Anthropic's own documentation: "By default, the cache has a 5-minute lifetime." The 1-hour cache is a separate, opt-in tier you request explicitly by setting ttl: "1h" on a cache_control breakpoint — it costs 2x the base input price to write, versus 1.25x for the 5-minute tier. This has not changed; it's the current, standing behavior.

Did Anthropic change the default prompt cache TTL in 2026?

Not the documented API default — that has been 5 minutes with 1-hour as an opt-in the whole time, per Anthropic's current docs. What changed, per community-reported analysis of real session data (not an official Anthropic announcement), is that Claude Code specifically appears to have stopped requesting the 1-hour tier by default around March 6, 2026, reverting its own effective behavior to the API's standard 5-minute default. That's a Claude Code product change, not an API contract change.

How do I get the 1-hour prompt cache tier from the Anthropic API?

Set ttl: "1h" inside the cache_control object on the breakpoint you want extended — for example, {"type": "ephemeral", "ttl": "1h"}. It is never applied by default; you request it per breakpoint, on every call where you want it.

Is the 1-hour cache tier worth the extra cost?

Depends on your reuse cadence. Anthropic's own guidance: if a prompt gets reused more often than every 5 minutes, stick with the 5-minute tier — it keeps refreshing at no extra charge. If it's reused less often than every 5 minutes but more than once an hour, the 1-hour tier's 2x write cost is usually cheaper than repeatedly paying full write price on a cold cache.

Does SlashSpend fix the 5-minute cache expiration problem?

It gives you a one-line way to request the 1-hour tier — the X-SlashSpend-Cache-Tier: 1h header upgrades a cache_control breakpoint to the 1-hour tier without changing your request body. It also routes any request carrying cache_control through Anthropic's native Messages API rather than an OpenAI-compatible translation layer that would otherwise silently drop the breakpoint. It doesn't change Anthropic's pricing or override their tier logic — it's a header, not a workaround.

Sources

Stop losing the cache you meant to keep.

One header gets you the 1-hour tier through SlashSpend — same base URL, same provider keys, real cache-hit data on your dashboard.