By Anant MishraEssay
Fictional arrivals and normalized prices. Six cache totals reproduced offline. Actual cache usage and billed service costs require operational evidence.
Executive Summary
A worked example of how request timing and changing prefixes alter the cost of an enterprise AI prompt cache.
About the Author
Anant Mishra
Global Head - Technology, AI & ICT | Technology & AI Transformation Executive
A team adds a cacheable policy manual to its AI assistant and sees a cheaper rate for cached input. The budget spreadsheet applies that rate to every request. A month later, actual spend is higher because many requests paid to create a new cache entry, and relatively few reused one. The manual was stable. The pattern of requests was the missing part of the estimate.
For enterprise AI planning, prompt reuse is a workload property worth measuring separately. A document can appear in thousands of requests without the service being able to reuse the same cached prefix in each one. Request timing, prefix construction and the selected service all affect the result. A cost estimate should expose those assumptions so the finance team can see how much of the proposed saving depends on them.
Start with the part of the prompt that can repeat
Anthropic’s prompt caching documentation describes caching prompt prefixes, with different lifetimes and rules for cache reuse. It also exposes separate token usage for cache creation and reads. Its pricing page distinguishes ordinary input, cache writes and cache hits, with model-specific rates. Check the selected model and service before transferring a rate into a budget.
For a planning exercise, split each request into a stable prefix and the content that varies. The prefix might contain the instruction and a versioned reference manual. The variable part might contain a question and retrieved evidence. Keep a record of which reference version each request uses. If the retrieval set changes every time, placing the cache boundary after that set can turn a seemingly reusable document into a stream of distinct prefixes.
A useful first question is how many tokens could be reused without changing what information the request receives. Count those separately from the tokens that must be processed afresh. Preserve the original task and its access requirements while assessing that opportunity. A cost experiment that quietly removes required evidence is evaluating a different service.
Give every creation cost a chance to earn its reuse
Let the cost of processing a chosen prefix once at the ordinary input rate be one unit. Use an invented tariff with a write multiplier of 1.25 and a read multiplier of 0.10. A single isolated request costs 1.25 units if it creates an entry. Two requests that share one write and one read cost 1.35 units in total. Those same two prefixes would cost two units at the ordinary rate.
The useful denominator is all eligible prefix processing across the measured workload, including writes. For W writes and R reads of equal-length prefixes, the example cost is 1.25W + 0.10R, compared with W + R at the ordinary rate. Unequal prefixes need their actual token counts in each category. A request hit rate alone cannot tell the finance team how many tokens were reused.
These multipliers are fictional inputs to illustrate the arithmetic. The structure of the estimate survives a tariff change because the rates are explicit. Store the price revision, model identifier, service and date beside any real estimate. Output tokens, variable input and other charges remain separate line items in a full service budget.
Read the gaps between requests
Consider four fictional requests at minutes zero, two, four and twelve. Assume the same prefix, a five-minute lifetime refreshed by each hit, and an entry available as soon as the write finishes. The first request writes, the next two read, and the final request writes again. At the invented rates, the prefix costs 2.70 units against four ordinary input units.
Move the same four requests to minutes zero, six, twelve and eighteen. Each arrives after the previous entry has expired under this model. Four writes cost five units. The token count, number of questions and reference document stayed fixed. Timing alone reversed the cost comparison. That makes arrival gaps a useful sensitivity variable before a team commits to a monthly saving.
A longer lifetime can change that trade-off, with its own write price. Compare complete request traces under each candidate rather than selecting the cheapest read rate. If a longer lifetime turns an expected series of writes into reads, its higher initial cost may be recovered. If each prefix appears once, it has no later read on which to recover the premium.
Check assumptions that a timeline cannot settle
The worked example treats writes as immediately available and requests as sequential. Concurrent requests can require different treatment. A real rehearsal should inspect the returned usage fields and retain the relationship between a logical task, its attempts and the token categories charged. Record failed attempts and retries so they remain visible in the monthly accounting.
Keep changing prefixes visible as well. A new manual revision, a different tool definition or a request-specific field before the boundary can alter reuse. Investigate changes with controlled inputs and permitted logs. The planning spreadsheet should carry a range for reuse until enough observations exist to estimate it for the workload.
Put the measured blend into the budget
The LLM inference cost calculator provides a starting point for input and output scenarios. For cache planning, first calculate the weighted prefix cost outside it, combine that with uncached input, and label any blended input rate used in a scenario. Include the original category totals so a reviewer can reconstruct that blend. The calculator’s two-rate view does not itself simulate cache lifetimes.
The companion Design study contains three fictional request patterns and an offline arithmetic verifier. It supplies a reproducible way to discuss the assumption. A production decision needs measured token categories, representative arrival histories and task-quality evidence from the actual service.
Sources
- Prompt caching — Anthropic documentation, checked 18 November 2026
- Pricing — Anthropic documentation, checked 18 November 2026
Related reading
Read the publishing standards or suggest a correction.
Continue the conversation
Putting a design decision into practice?
If this essay raises a question for your organisation, discuss the constraints, evidence and implementation choices with Anant Mishra. This is an invitation to talk, not a claim that the examples represent delivered client work.