Guides

How prompt caching changes session cost

Caching can reduce repeated-input cost, but only under each provider’s exact rules.

3 min

A concise editorial guide, not a universal recommendation or guarantee.

Decision rule

Long agent sessions repeatedly send instructions, tool definitions, and history. A cache hit may price that repeated prefix differently, while writes, expiry, minimum lengths, or changed prefixes can remove the saving. Track cache-read and cache-write usage separately and treat missing catalogue prices as unavailable, never free.

Practical checklist

  • Keep stable prefixes actually stable.
  • Inspect cache reads and writes separately.

Sources checked

These first-party or authoritative sources ground the note. Checked 2026-08-16.

  1. Anthropic prompt caching(opens in a new tab)
  2. OpenAI prompt caching(opens in a new tab)