Berk Bayri

Prompt caching

A model provider stores the processed start of a prompt so that later requests beginning with exactly the same text skip that work. Repeated instructions, documents and tool definitions then cost less and return faster.

Every request to a language model is billed and processed token by token, including the parts that never change: the long system instructions, the policy manual pasted in as context, the twenty tool definitions an agent carries on every call. Prompt caching lets the provider keep the processed version of that fixed opening for a while. The next request that starts with the same text reads it from the cache instead of computing it again.

The match is on the prefix, and it is strict. On Anthropic's API, for example, the cached part is built in a fixed order (tools, then system instructions, then messages) and a change anywhere before the cache point means a new cache entry. A timestamp at the top of the system prompt or a reordered tool list can quietly turn caching off for every call.

Why the finance team should care

For products with long, stable context, caching can cut input cost sharply. Anthropic's current documentation prices a cache read at a tenth of the normal input price or less, depending on the model, while writing to the cache costs more than a normal request: 1.25 times the input price for the default five-minute lifetime, twice the price for a one-hour lifetime. The five-minute entry is refreshed each time it is used. Prompts shorter than a minimum length are not cached at all, with no error; on Anthropic that minimum runs from 512 to 4,096 tokens depending on the model. OpenAI, Google and others publish their own minimums, lifetimes and prices, and these change often enough that the figures in a business case should be checked against the provider's page on the day.

Prompt caching

Anthropic · 2026-11-27

Prompt caching

OpenAI · 2026-11-27

The catch is traffic shape. A cache that expires before the next request arrives was paid for and never used. Steady, high-volume workloads with a shared opening benefit most. Bursty internal tools with one request an hour may pay the write premium and gain little. That is why caching belongs in the total cost of ownership model as an assumption with its own test, and why a cheaper per-token price can still move the cost instead of removing it.

What it does not do

Caching does not store answers. The model still generates a fresh response each time, so it does not make output more consistent and it does not reduce output cost. It only saves the work of reading the same opening again. Teams that want identical answers to identical questions need a separate response cache, with its own rules for when a stored answer is too old to serve.