Prompt Caching, Explained: Save the Model's Working State Instead of Rebuilding It
Reading a prompt is real work the model does before it can answer: a pass called prefill, in which it processes every input token and builds the key and value vectors that make up its working state. Prompt caching saves that state — system prompt, tools, content, history and all.
When a later request starts with the same input tokens, the caching service loads the saved state instead of computing it again; the reuse depends on that identical opening text.
AI-generated discussion · Different perspectives
There are two dials here. Implicit caching lets Bedrock choose what to keep as the conversation grows, while explicit caching marks shared material such as tools and instructions for reuse across sessions and when spinning up helper agents. Use both and you get a reusable starting point while the growing conversation is handled automatically.
The reusable prefix has to reach 1,024 tokens to qualify at all. Since the natural thing to cache is the static part — the tools and instructions that stay the same across requests — the trick rewards agents that were already lugging around a bulky setup, not the lean ones that most need relief.