---
source: https://iinventedlight.com/library/notes/ao-caching-anthropic-cache-control.md
title: "Claude prompt caching: automatic cache_control and explicit breakpoints"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "MIT (anthropics/claude-cookbooks (GitHub)); Apache-2.0 (vllm-project/vllm (GitHub)); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "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)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-16
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-16
as_of: 2026-11-16
confidence: medium
untested: "Not reproduced (2026-11-16). Docs read; no API call was made for this note."
category: agent-operations
topic_area: "agent operations: prompt caching"
tags: [prompt-caching, anthropic, claude, cache-control]
client: Librarian
sources:
  - id: S1
    title: "Prompt caching"
    publisher: anthropics/claude-cookbooks (GitHub)
    url: https://github.com/anthropics/claude-cookbooks/blob/main/misc/prompt_caching.ipynb
    accessed: 2026-11-16
    license: "MIT"
  - id: S2
    title: "Automatic prefix caching (vLLM docs)"
    publisher: vllm-project/vllm (GitHub)
    url: https://github.com/vllm-project/vllm/blob/main/docs/features/automatic_prefix_caching.md
    accessed: 2026-11-16
    license: "Apache-2.0"
---
# Claude prompt caching: automatic cache_control and explicit breakpoints
**Answer:** There are two ways to enable prompt caching with the Claude API:

- **Automatic caching** (recommended): one `cache_control` field at the top level of the request, for example `cache_control={"type": "ephemeral"}`. The system places the cache breakpoint on the last cacheable block.
- **Explicit cache breakpoints**: place `cache_control` on individual content blocks for fine-grained control.

## Behaviour

- The first call writes to the cache, so timing is similar to the baseline; the second call reuses the cached prefix.
- In a multi-turn conversation the breakpoint automatically moves forward as the conversation grows.
- Explicit breakpoints help to cache a system prompt independently from message content. You can combine both approaches.
- Usage reports `cache_creation_input_tokens` and `cache_read_input_tokens`.

## 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

- [ao-caching-openai-automatic-prompt-caching](https://iinventedlight.com/library/notes/ao-caching-openai-automatic-prompt-caching/)
- [ao-caching-gemini-context-caching](https://iinventedlight.com/library/notes/ao-caching-gemini-context-caching/)

## Claims

- id: C1
  claim: Automatic caching uses one top-level field.
  source: S1
  evidence: "Add a single `cache_control` field at the top level of your request."

- id: C2
  claim: Breakpoint moves forward over turns.
  source: S1
  evidence: "The cache breakpoint **automatically moves forward** as the conversation grows"

- id: C3
  claim: No gain without a shared prefix.
  source: S2
  evidence: "new queries do not share the same prefix with any of existing queries"

## Sources

- [S1] Prompt caching. anthropics/claude-cookbooks (GitHub). https://github.com/anthropics/claude-cookbooks/blob/main/misc/prompt_caching.ipynb . License: MIT. Accessed 2026-11-16.

- [S2] Automatic prefix caching (vLLM docs). vllm-project/vllm (GitHub). https://github.com/vllm-project/vllm/blob/main/docs/features/automatic_prefix_caching.md . License: Apache-2.0. Accessed 2026-11-16.

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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
