AI GLOSSARY · PRICING, LIMITS AND PLANS

Prompt caching

Markdown version

Definition

Prompt caching lets a model provider reuse processed state for a matching prompt prefix, which can reduce repeated input processing, latency and input cost while still generating a new response.

Also called: prompt cache.

In plain language

AI applications often resend the same instructions, tool definitions or reference material. Prompt caching allows a provider to preserve processed state for an eligible prefix and reuse it when a later request matches through an available cache breakpoint. New or changed content after that point is still processed normally, and the model generates a new answer. A change does not necessarily invalidate every shorter cached prefix; reuse depends on the provider’s breakpoint, lookup, model and lifetime rules. Cached text still occupies context and can still count toward provider-defined rate limits. Check returned usage fields rather than assuming that a cache hit occurred or saved money.

Technical definition

Anthropic documents top-level automatic caching and block-level explicit cache breakpoints. Its prefixes are ordered through tools, system content and messages; content must match through the reused breakpoint. Top-level automatic caching is unavailable on Amazon Bedrock’s bedrock-runtime route, where explicit breakpoints are required. OpenAI enables prompt caching by default for supported models and requires the rendered prefix to match through an eligible breakpoint; available breakpoint controls and minimum cacheable lengths depend on the model. Both vendors expose cache usage fields. Prompt caching does not enlarge the context window or reuse a completed response.

Worked examples in this catalogue

Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.

  1. Skill by Skill Almanac · Illustrative, not executed

    llm-cost-estimator 56/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    A workflow that applies a user-supplied, dated price table and workload profile to model possible cache-write and cache-read effects without supplying vendor prices itself.
    Why it exercises the concept
    Prompt caching changes input accounting when reuse occurs. This illustration can compare scenarios from measured usage and current prices, but it neither creates cache hits nor verifies a provider bill.

How it shows up when you use agents

Agents commonly resend stable material: system instructions, tool definitions, project rules, reference documents and earlier conversation turns. Prompt caching lets a provider preserve processed state for an eligible prefix and reuse it when a later request matches through an available breakpoint. The provider still processes new suffix content and the model still generates a new response.

Exact matching needs some nuance. If content or a relevant setting changes, reuse beyond the changed portion can fail. A provider may still find a shorter matching prefix at an earlier eligible breakpoint. Whether that happens depends on the model, caching mode, breakpoint placement, lookup rules and cache lifetime.

Illustrative scenario: an agent sends the same tool definitions and project instructions before a changing user task. Placing stable material first makes a reusable prefix possible. A later request changes only the final task. If the provider finds the earlier eligible prefix, returned usage fields can report cached input; if it does not, the request may process or write that material again. This is an illustration, not a promise of a cache hit or lower latency.

Anthropic documents both automatic caching and explicit breakpoints. Its top-level automatic mode is not available on the documented Amazon Bedrock bedrock-runtime route, where explicit breakpoints are needed. OpenAI documents default caching for supported models, with model-dependent breakpoint and eligibility rules.

Next action: keep reusable content stable and early, then inspect the provider’s cache-read and cache-write usage fields over representative requests before estimating savings.

Common confusions

  • Prompt caching versus response caching. Prompt caching reuses processed input state; it does not return a stored answer.
  • Caching versus context size. Cached content still occupies the context window.
  • Exact prefix versus all-or-nothing matching. A change can block reuse after that point without necessarily invalidating an earlier eligible prefix.
  • Provider implementations. Automatic modes, explicit controls, lifetimes, thresholds, prices and platform support differ.

Terms that mention Prompt caching

6 terms mention this one

Guides that mention Prompt caching

More in Pricing, limits and plans

Next steps

  1. llm-cost-estimator A skill that exercises it.
  2. Inference Related term.
  3. Context window Related term.
  4. All glossary terms A to Z and by family.

Sources

Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-25. Wikipedia is never the only source.

Review record

Last verified

Drafted by claude-sonnet-5-5; revisions: OpenAI Codex (configured gpt-5.6-sol); sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-25. Last verified .

Change log (5)
  • : Independent automated factual/example/alias and four simulated-reader checks closed. Cached US definition-query estimate aligned; not distinct users or promised traffic. Final runtime gate separate; publication disabled.
  • : First version.
  • : Verifier pass: aligned OpenAI cached_tokens wording, /usage description, packer rationale.
  • : Codex source/example/alias revision staged after independent initial review; exact-version independent closure and runtime gates pending.
  • : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.