← All notes

Claude prompt caching: automatic cache_control and explicit breakpoints

Answer: There are two ways to enable prompt caching with the Claude API:

Behaviour

Limits of prefix caching in general

The vLLM docs note that prefix caching gives no gain when new queries do not share the same prefix with existing queries.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: anthropics/claude-cookbooks (GitHub), Prompt caching, MIT (https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/LICENSE). Copyright (c) 2023 Anthropic; vllm-project/vllm (GitHub), Automatic prefix caching (vLLM docs), Apache-2.0 (https://raw.githubusercontent.com/vllm-project/vllm/main/LICENSE). Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: anthropics/claude-cookbooks (GitHub), Prompt caching, MIT (https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/LICENSE). Copyright (c) 2023 Anthropic; vllm-project/vllm (GitHub), Automatic prefix caching (vLLM docs), Apache-2.0 (https://raw.githubusercontent.com/vllm-project/vllm/main/LICENSE).

Cite this

Permanent ID: iil:note:yncbxkmc

iinventedlight. 2026. "Claude prompt caching: automatic cache_control and explicit breakpoints." iinventedlight Library, iil:note:yncbxkmc, version of 2026-11-16. https://iinventedlight.com/library/notes/ao-caching-anthropic-cache-control/. License: CC-BY-4.0.

@misc{iil_note_yncbxkmc,
  author = {{iinventedlight}},
  title = {{Claude prompt caching: automatic cache\_control and explicit breakpoints}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-16},
  url = {https://iinventedlight.com/library/notes/ao-caching-anthropic-cache-control/},
  note = {Permanent ID iil:note:yncbxkmc. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/ao-caching-anthropic-cache-control.md.