You turned on prompt caching and your bill did not move. Check the usage block: if cache_read_input_tokens is 0 on every call, you are paying extra to write a cache nobody reads.

This post covers six reasons a Claude prompt cache never hits, and the fix for each. Every rule and number comes from Anthropic's official prompt caching documentation, checked on November 30, 2026.

The analogy: a bookmark in a book

Think of your prompt as a book and the cache as a bookmark. The bookmark says "everything up to this page is already read". It only works if every page before it is the same as last time. Change one word on page 3 and the bookmark on page 200 is useless: the reader has to start again from the top.

That is the whole mental model. A cache breakpoint covers the full prefix before it, and the docs say hits require "100 percent identical prompt segments, including all text and images up to and including the block marked with cache control."

Why a miss costs more than no caching

Caching changes the price of input tokens:

Token type Price vs base input
Cache write, 5-minute TTL 1.25x
Cache write, 1-hour TTL 2x
Cache read 0.1x (0.05x on Claude Opus 5.5 and Sonnet 5.5, 0.025x on Fable and Mythos 5.1 and 5.2)

So a cache that always misses costs you 25% more on the cached part than doing nothing. A cache that hits costs a tenth or less. There is no neutral outcome, which is why it is worth five minutes to check.

First, measure

The response usage object has three fields that matter:

  • cache_creation_input_tokens: tokens written to the cache on this request
  • cache_read_input_tokens: tokens read from the cache on this request
  • input_tokens: tokens after the last cache breakpoint, neither read nor written

The docs give the sum:

total_input_tokens = cache_read_input_tokens + cache_creation_input_tokens + input_tokens 

A small helper that prints the hit rate:

import anthropic client = anthropic.Anthropic() def ask(question: str, big_doc: str): response = client.messages.create( model="claude-opus-5-5", max_tokens=1024, system=[ {"type": "text", "text": "You answer questions about the document."}, { "type": "text", "text": big_doc, "cache_control": {"type": "ephemeral"}, }, ], messages=[{"role": "user", "content": question}], ) u = response.usage total = u.cache_read_input_tokens + u.cache_creation_input_tokens + u.input_tokens print(f"read={u.cache_read_input_tokens} write={u.cache_creation_input_tokens} " f"uncached={u.input_tokens} hit_rate={u.cache_read_input_tokens / total:.0%}") return response 

Call it twice with the same document. The first call should show a write. The second should show a read. If it does not, work down this list.

Cause 1: something changes before the breakpoint

The classic one. You put the current time, a request id or the user's name near the top of the system prompt. The prefix is now different on every call.

The docs walk through this exact case: a static context followed by a block with a timestamp, with cache_control on the timestamp block. The result: "You pay for a fresh cache write on every request and never get a read."

Fix: put the breakpoint "on the last block that stays identical across requests". Static content first, changing content after the breakpoint.

system=[ {"type": "text", "text": STATIC_INSTRUCTIONS, "cache_control": {"type": "ephemeral"}}, # bookmark goes here {"type": "text", "text": f"Current time: {now}"}, # changes every call, after the bookmark ] 

Cause 2: automatic caching on a prompt with a changing tail

Automatic caching is one top-level field:

{ "model": "claude-opus-5-5", "max_tokens": 1024, "cache_control": {"type": "ephemeral"}, "system": "...", "messages": [] } 

The system "automatically applies the cache breakpoint to the last cacheable block". That is great for a growing chat, because the breakpoint moves forward with the conversation. It is the wrong tool for a single-shot prompt where the last block is the part that changes. The docs say so directly: in that structure automatic caching "has the same problem", so use an explicit breakpoint on the last stable block.

Also note: on Amazon Bedrock (bedrock-runtime) a top-level cache_control returns a 400 error.

Cause 3: the prompt is too short

Below a minimum length, the prompt is processed without caching and, importantly, "no error is returned". You just see zeros. The minimums on the Claude API:

Minimum Models
512 tokens Claude Fable 5.2, Mythos 5.2, Fable 5.1, Mythos 5.1, Opus 5.5, Opus 5, Sonnet 5.5, Fable 5, Mythos 5, Haiku 5.5
1,024 tokens Claude Opus 4.8, Sonnet 5, Sonnet 4.6, Sonnet 4.5, Opus 4.1, Opus 4, Sonnet 4
2,048 tokens Claude Mythos Preview, Opus 4.7
4,096 tokens Claude Opus 4.6, Opus 4.5, Haiku 4.5

A common trap: you test on one model, then route cheap traffic to an older Haiku and the same 3,000-token prompt silently stops caching.

Cause 4: you changed something upstream

Cache prefixes are built in a fixed order: tools, then system, then messages. The rule: "Changes at each level invalidate that level and all subsequent levels."

Some examples from the invalidation table in the docs:

  • Changing tool definitions invalidates everything: tools, system and messages.
  • Toggling web search or citations keeps the tools cache but invalidates system and messages.
  • Changing tool_choice or adding or removing images invalidates the messages cache only.

So an agent that adds one tool on step 5, or picks a different tool list per user, throws away the whole cache each time. Keep the tool list fixed and sorted. The docs also warn that some languages (they name Swift and Go) randomize key order during JSON conversion, which breaks caches on tool_use blocks. Serialize with stable key ordering.

Cause 5: the conversation outgrew the lookback window

When a request arrives, the system looks backward from each breakpoint for an earlier cache entry. It "checks at most 20 positions for each breakpoint, counting the breakpoint itself as the first".

In an agent loop with many tool calls, one turn can add more than 20 blocks. The docs spell out the limit: "If a growing conversation pushes your breakpoint 20 or more blocks past the last write, the lookback window misses it."

Fix: add a second breakpoint earlier in the conversation so a write lands there before you need it. You can define up to 4 breakpoints per request. On the Claude API, a run of consecutive tool_use blocks counts as one position, and so does a run of consecutive tool_result blocks, which helps.

Cause 6: timing

Two timing rules catch people.

First, the default lifetime is 5 minutes, refreshed at no extra cost each time the entry is used. A job that runs every 10 minutes will always miss. For that, pay the 2x write and use the 1-hour TTL:

"cache_control": { "type": "ephemeral", "ttl": "1h" } 

If you mix TTLs in one request, the longer one must come first: "a 1-hour cache entry must appear before any 5-minute cache entries".

Second, parallel fan-out. If you fire 20 requests at once with the same prefix, they all miss, because "a cache entry only becomes available after the first response starts". Send one request, wait for its response to start, then send the other 19.

One more scoping note: caches are never shared between organizations, and on the Claude API they are also isolated per workspace. Staging traffic in one workspace does not warm the cache for production in another.

A quick break-even check

With the standard multipliers, a 5-minute cache pays off on the second request: 1.25 for the write plus 0.1 for one read is 1.35 units, versus 2.0 units for two uncached calls. The 1-hour cache costs 2.0 to write, so it breaks even around the third request (2.0 + 0.1 + 0.1 = 2.2 versus 3.0). If a prefix is used once, do not cache it.

Takeaways

  • Log cache_read_input_tokens and cache_creation_input_tokens on every call. A read count of 0 means you are paying a 25% surcharge for nothing.
  • Order the prompt by how often it changes: tools, stable system text, breakpoint, then anything per-request.
  • Check the minimum for your exact model. Short prompts skip caching with no error.
  • Keep tool definitions and JSON key order stable. A change upstream invalidates everything after it.
  • In long agent loops, add a second breakpoint so you stay inside the 20-position lookback.
  • For gaps over 5 minutes use "ttl": "1h". For parallel calls, warm the cache with one request first.

Source: Prompt caching, Claude API documentation.