Prompt caching explained: reusing the KV cache cuts input costs by ~95%

rseroter · x · 2026-12-01

rseroter highlights @iRomin's article as the best practical explanation he's seen of saving LLM costs through smarter prompt design. Key idea: with prompt caching, a large static system prompt (e.g. 15,000 tokens) plus docs is prefilled once and stored as a KV cache; later turns skip the cold prefill entirely, so cached tokens cost 95% less and responses get faster. An accompanying diagram contrasts the "cold prefill every turn" flow (100% input cost, higher latency) with the cached flow, using Gemini as the example, and the piece demystifies prompt caching, KV cache and prefills with concrete examples.

Original post →

More from coding & agent

coding & agent channel →