02Chapter 2: What the provider actually stores: reusable attention stateThis chapter assumes you can call an LLM API, know what tokens and context windows are, and can read short Python snippets. It builds on the previous chapter's point that prefill (processing the prompt before generating) is the costly step. Here you will see what a provider keeps so it can skip that3 min read
03Chapter 3: Why only an identical prefix can hitThis chapter assumes you can call an LLM API, know what tokens and context windows are, and can read short Python snippets. It also assumes you know that a provider stores reusable attention state (the key/value cache) from earlier prompts. Here you will see why that stored state can only be reused 3 min read
04Chapter 4: Explicit breakpoints and automatic cachingThis chapter assumes you can call an LLM API, know what tokens and context windows are, and can read short Python snippets. It also assumes you know the previous idea: a cache hit needs an identical prompt prefix.3 min read
05Chapter 5: Laying out prompts: stable content first, variable content lastThis chapter assumes you can call an LLM API, know what tokens and context windows are, and can read short Python snippets. It also assumes you know that a cache hit needs an identical prompt prefix, which an earlier chapter covered. Here you will apply that rule to the way you build prompts.3 min read
06Chapter 6: How long a cache entry lives and what refreshes itThis chapter covers cache lifetime, usually called time to live (TTL). It assumes you know how exact prefix matching works and that you can read a short Python snippet. It also assumes you have already placed a cache breakpoint or let the provider cache automatically.3 min read
07Chapter 7: Minimum prompt length for cachingThis chapter assumes you know what tokens are, have called an LLM API, and can read short Python. It also assumes you know that a cache hit needs an identical prefix, which an earlier chapter covered.3 min read
08Chapter 8: What caching changes in cost and latencyThis chapter assumes you have read the earlier chapters on prefill, exact prefix matching, and cache lifetime. You should be comfortable with token-based pricing and short Python snippets.3 min read
09Chapter 9: Reading usage fields and computing a hit ratioThis chapter assumes you can call an LLM API from Python, know what tokens are, and understand that a cache hit needs an identical prompt prefix. Here you learn to read the usage data a provider returns and turn it into one number you can track.3 min read
10Chapter 10: Tools, system prompts and growing conversation historyThis chapter assumes you know that a cache hit needs an identical prefix, that breakpoints mark where a cached prefix ends, and that you can read short Python snippets. Here you apply those ideas to the three parts that make up most real requests: tool definitions, the system prompt, and the message3 min read
11Chapter 11: Finding and fixing the changes that break your cacheThis chapter assumes you know how exact prefix matching works, how to read the three usage counters (tokens written, read, and uncached), and how to compute a hit ratio. Here you will use those tools to find out why a cache that should hit does not.2 min read
12Chapter 12: Parallel requests and warming the cacheThis chapter assumes you know how exact prefix matching works, what a cache lifetime (TTL) is, and how to read the usage fields that report cache writes and reads. It also assumes you can read short Python snippets.3 min read
13Chapter 13: Routing hints and cache keys for high-volume trafficThis chapter assumes you know exact prefix matching, how to read usage fields, and how to compute a hit ratio. It covers what changes when one prompt prefix receives many requests per minute.2 min read
14Chapter 14: Deciding when caching is worth itThis chapter assumes you know how exact prefix matching works, how cache lifetime (TTL) behaves, and how to read the usage fields from earlier chapters. Here you will use those pieces to decide whether caching saves money for a given workload.2 min read