Skip to content
LLM Engineering

What is Prompt Caching?

Reusing priced prefixes of a prompt across requests so repeated system context bills at the reduced cached rate. Long builder sessions benefit most, since stable instructions and history prefixes repeat every turn.

Example

BYOB model configs price cached input far below live input, with a small write cost to store the prefix — sessions that keep system prompts stable pay the cheap rate on every repeat turn.

What people get wrong

Expecting caching to help wildly varying prompts. Only stable shared prefixes hit the cache; rewriting instructions each turn pays full price plus write costs.

Frequently asked questions

What breaks the cache most often?

Reordering content, appending timestamps to the prefix, or swapping models — all three turn a cache hit into a full-price call plus a fresh write.

Sources

Browse all LLM Engineering terms →