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.
More from coding & agent
- Steer Camp Ships Planning, Group Chats and Inbox Upgrades Across Mac and iPhone — pramodk73 · 2026-12-01
- Serverless Framework v4.47.0 adds 30-min Lambda timeouts, JWT authorizers, GPUs — DavidWells · 2026-12-01
- Grok to make group chat bots read-only, shares multi-bot migration guide — EricBuess · 2026-12-01
- Diagram Designer bot turns text descriptions into clean editorial figures in HTML/SVG/PNG — bfrench · 2026-12-01
- Paradigma launches Cyclops: agent swarm finds ~7x more vulns per dollar than frontier APIs — tokenbender · 2026-12-01
- How safe is installing user-made AI apps and mods from GitHub? — blackSeedsOf · 2026-12-01