# Prompt caching

Reuse a stable, up-front prompt prefix across calls so repeated tokens are cheaper and faster to process.

## Why the CCAR-P exam tests this

The exam checks you know caching requires a stable prefix ordered first and helps cost/latency, not accuracy.

## Definition

Prompt caching lets Claude store and reuse the processed form of a **stable prompt prefix** — typically a long system prompt, a document, tool definitions, or few-shot examples — so subsequent requests that share that prefix skip reprocessing it. This cuts **latency** and the cost of the cached tokens on repeat calls.

The design rule is **order matters**: put the stable, reusable content **first** and the variable content (the user's specific question) **last**. A cache hit requires the prefix to match exactly up to the cache breakpoint, so anything that changes per request must come after the cached segment. Caches are time-limited and evict, so caching helps most when the same prefix is hit repeatedly within a short window.

Caching is a **cost and speed** optimization. It does not change the answer's quality and is not a way to give the model persistent memory — the cached content still occupies the context window on every call.

## Exam trap

Placing variable, per-user content before the stable prefix breaks cache hits; caching also does not improve answer quality or act as long-term memory.

## Commonly confused with

- **context-window-management** — Caching reprocesses fewer tokens but the cached content still counts against the context window.
- **no-customer-fine-tuning** — A cached prompt is reused steering context, not a trained-in change to the model.

## Related

- context-window-management
- no-customer-fine-tuning
- extended-thinking

---

Source: Claude Cert Prep — an independent, unofficial CCAR-P study resource (domain P2). Not affiliated with Anthropic.
