Prompt caching is a hosted provider reusing the attention state behind a stable prompt prefix and billing the reused input tokens at a vendor-reported discount instead of full price.

Why builders care

Long system prompts, tool definitions, and reference documents repeat on every agent turn, and reprocessing them each time dominates input-token spend. Prompt caching converts the repeat into savings: the first request writes the prefix entry, later requests with the same exact prefix read it back at the discounted rate. It is the billed cousin of prefix caching, built on the same per-request mechanism as the KV cache. For the full four-layer comparison, read the caching layers guide.

Local relevance

The layout discipline is the same self-hosted or hosted: stable content first, dynamic content last, as described in the system prompt entry. On provider APIs the control surface is breakpoints marking the end of the stable prefix, with conversation history growing after them; never interpolate timestamps or user IDs ahead of a breakpoint. Pricing multipliers are vendor-reported and move with the provider price page, so confirm the current write and read rates there before budgeting.

← Back to all definitions