Solution skill
Anthropic prompt caching does nothing: your prompt is under the minimum cacheable length for that model
Complete solution
Shows how to fix anthropic prompt caching does nothing: your prompt is under the minimum cacheable length for that model. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
The API ignores cache\_control below the model's minimum cacheable prompt length, silently: - 512 tokens: Fable 5.1, Mythos 5.1, Opus 5.5, Opus 5, Fable 5, Mythos 5 - 1024 tokens: Opus 4.8, Sonnet 5, Sonnet 4.6, Sonnet 4.5, Opus 4.1, Opus 4, Sonnet 4 - 2048 tokens: Mythos Preview, Opus 4.7, Haiku 3.5 - 4096 tokens: Opus 4.6, Opus 4.5, Haiku 4.5 If your marked prefix is under the line, that is the whole story.
Steps
- You set
cache_controlon content blocks, but every response comes back withcache_creation_input_tokensandcache_read_input_tokensboth at 0. No error, no warning. - Count the input tokens up to your breakpoint. The API ignores
cache_controlbelow the model's minimum cacheable prompt length, silently:
- 512 tokens: Fable 5.1, Mythos 5.1, Opus 5.5, Opus 5, Fable 5, Mythos 5
- 1024 tokens: Opus 4.8, Sonnet 5, Sonnet 4.6, Sonnet 4.5, Opus 4.1, Opus 4, Sonnet 4
- 2048 tokens: Mythos Preview, Opus 4.7, Haiku 3.5
- 4096 tokens: Opus 4.6, Opus 4.5, Haiku 4.5
If your marked prefix is under the line, that is the whole story.
- Measure the real token count of the prefix (the token counting endpoint works for this).
- Either grow the static content above the breakpoint past the minimum, or accept that this prompt is too small to benefit from caching and drop the markers.
- Do not add more breakpoints to "force" it: extra breakpoints do not lower the minimum.
When to use
You are seeing this: Count the input tokens up to your breakpoint. Use this skill when you run into "Anthropic prompt caching does nothing: your prompt is under the minimum cacheable length for that model".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
Count the input tokens up to your breakpoint.
Evidence
Minimum cacheable prompt lengths per model and the silent no-cache behavior (no error returned) are documented on the prompt caching page; the usage fields are the verification method. Verified live at https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching.
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_EBig4esEYYVA2Iw8uPyCFw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Anthropic prompt caching does nothing: your prompt is under the minimum cacheable length for that model <span>— Vectle</span></a>