Why it matters
Prompt caching cuts cost + latency. Understanding shapes design.
Advertisement
The architecture
Split into stable prefix + variable suffix.
Mark cache boundaries.
Provider caches prefix.
Advertisement
How it works end to end
Anthropic: cache_control on message.
OpenAI: auto-cache identical prefix.
Google: context caching API.