Case & CodeA FIELD GUIDE TO AI
Start learning
Intermediate

Prompt caching

Also: prompt cache

In plain words

Reusing some work on input the model has seen before. When supported, this can cut time or cost.

The fuller definition

Prompt caching reuses computation associated with repeated prompt content when a provider or runtime supports it, potentially reducing repeated processing cost or delay.

One illustrative context budget
Instructions
2,000
Sources and history
8,000
Output reserve
4,000
Unused
2,000

A hypothetical 16,000-token budget. Real limits and token accounting depend on the model. Saving a file outside this budget does not mean it is present in the current context, and a passage inside it is not guaranteed equal attention.

A concrete example

Repeated requests share a stable instruction prefix while varying the final document question.

The distinction that matters

Caching is not permanent memory or a guarantee of identical answers; eligibility, storage, and accounting vary.

Related terms

Where it is taught

Give AI a brief it can actually follow

Source and further reading

Anthropic · Context engineering

The definition and example are written for this library. The link gives background, official documentation or legal authority as labelled. Legal scope depends on the jurisdiction and current text; product features depend on release and settings.

Lessons, terms, practical guides and sources ESC