Start here Introduction Part 1 Why the cache is a prefix Part 2 Where the breakpoint goes Part 3 What it costs, and for how long Part 4 Running it After the parts Recap After the parts Practice 19 Check yourself Appendix Glossary Appendix References Index · Full page
ai · llm · 12 September 2026
Prompt caching, from the causal mask outward · After the parts
Practice Cards that walk the argument one step at a time: pick the answer from first principles, and a miss names the section to go back to.
Index Full page Recap
Contents After the parts Start here Introduction Part 1 Why the cache is a prefix Part 2 Where the breakpoint goes Part 3 What it costs, and for how long Part 4 Running it After the parts Recap After the parts Practice 19 Check yourself Appendix Glossary Appendix References Index · Full page
Check yourself Check yourself 11 cards
The test this post is written against is that you can now rederive it. Each card is a step of the argument with a few answers, one of them right — and the wrong ones are the objections the post answers along the way. A card you miss names the section to go back to.
Practice →
01 Why can the cacheable unit only ever be a prefix, and never a single block? — 02 Marking one block with cache_control writes how many cache entries, and covering what? — 03 When the hash at your breakpoint does not match, what is the backward walk looking for? — 04 Why does a breakpoint on a block carrying a timestamp cost more than not caching at all? — 05 How far back does a read walk, and what counts as one position? — 06 What is input_tokens, exactly? — 07 When does the TTL clock start? — 08 You reword one tool description. What survives in the cache? — 09 An operator instruction arrives on turn nine. How do you deliver it without losing the conversation? — 10 How many requests does a 5-minute cache write take to pay for itself? — 11 You fire N identical requests in parallel over one large shared prefix. What happens? — ← Previous · After the parts Recap Next → · Appendix Glossary