Skip to main content
Skip to content
DN Research

Prompt caching pays only when reuse arrives in time

A cache-episode ledger separates prefix writes, reads and expiry to show the reuse frequency needed for a synthetic prompt cache to break even.

A reusable engraved prompt plate sits beside arriving pages and an hourglass. Editorial illustration.
Reading options: audio, text size & sections

Research scope: Documentary analysis with a hypothetical worked example. Sources reviewed 5 December 2026; this is a planning and interpretation guide, not a report of 2027 observations.

A reusable prompt is an opportunity to save work, not evidence that a cache will save money. The saving depends on whether the same eligible prefix returns while its cache entry is usable, how writes and reads are charged, and how many separate cache episodes the workload creates.

A team can have thousands of requests and little valuable reuse. Each customer might supply a different document; a changing timestamp might break prefix identity; or long gaps might require repeated writes. Counting total requests without their prefix and arrival pattern hides the question that determines the cache economics.

This article holds tokenization fixed. DN's billing-unit analysis already explains why identical documents can produce different billed counts across models. Here the new variable is what happens to one unchanged prefix over successive calls.

A cache episode has a beginning and an end

Claude's prompt-caching documentation distinguishes cache creation and cache reads, with matching and expiry rules. Amazon Bedrock describes model-dependent caching support and notes that implicit cache hits are not guaranteed. Google's context-caching documentation separates implicit from explicit mechanisms. [1][2][3]

These differences matter before any arithmetic. One provider's cache lifetime, refresh behavior or billing treatment should not be applied to another service. An explicit cache object and an implicit prefix hit can expose different controls and usage evidence. Preserve the service, model, API and documentation version behind each assumption.

For this ledger, an episode begins with a charged write and contains subsequent reads of that same prefix before it becomes unusable. A later request that needs another write starts another episode. This is an accounting definition for the example; it does not assert that every service names or implements episodes this way.

Worked example: five calls can produce three bills

Assume an unchanged 10,000-token prefix. Its ordinary uncached processing costs ten fictional units per call. A cache write costs twenty units and a cache read costs two. The tokenizer, prefix and rates remain fixed. None of these rates is a vendor quotation.

The table counts prefix charges only. The varying request suffix, generated output, tools and other costs are assumed identical across routes and excluded from this narrow comparison. If they differ in a real experiment, they belong in the complete bill.

Synthetic arrival pattern Calls Cache writes Cache reads Prefix cost Uncached comparison
One episode, four successful reuses 5 1 4 28 units 50 units
Two episodes containing three and two calls 5 2 3 46 units 50 units
Five isolated episodes 5 5 0 100 units 50 units

The first pattern saves 22 units. The second saves four. The third costs fifty more than leaving all five calls uncached. The number of calls is unchanged; the number of expensive starts differs.

That distinction is especially useful when comparing a development demonstration with a production workload. A developer often repeats the same test in quick succession. Real customers may arrive less predictably, across isolated workspaces or with different content. The demonstration can establish that caching works without establishing the production reuse distribution.

Derive break-even for one episode

For an episode containing n calls, the synthetic cached charge is 20 + 2 × (n − 1), or 18 + 2n. The uncached charge is 10n. Caching is cheaper when n is greater than 18 divided by eight, which is 2.25.

Because calls are whole events, three calls are the first profitable episode in this example. Two calls cost 22 cached units against twenty uncached. Three cost 24 against thirty. This is a threshold derived from the declared prices, not a universal rule that every prompt needs three uses.

For several episodes, count writes directly. If N calls create E episodes, the charge is 20E + 2(N − E). For five calls, the break-even condition becomes E less than 40 divided by eighteen, or about 2.2222. Two episodes save money; three would cost 64 units and exceed the uncached fifty.

The count identity is a useful check: writes plus reads must equal the calls represented by this simplified ledger. Requests with uncached prefixes, partial hits or multiple separately charged cache sections require more detailed rows rather than being forced into that identity.

Treat expiry as an observed condition

Record the first eligible use, subsequent arrival times and the applicable expiry or refresh rule. Do not simply count every repeated document as a hit. A request can be semantically similar while failing the service's required prefix match. Different tool definitions, system instructions or content order can also matter under the documented implementation. [1]

Prefer the provider's reported usage fields for the actual write/read classification. A local prediction remains useful for planning, but should remain labelled predicted until reconciled with the response and billing records. Bedrock's distinction between supported modes and best-effort implicit reuse is a reason to preserve this separation. [2]

Google's distinction between implicit and explicit caches similarly cautions against treating every caching product as a customer-controlled object with an identical lifetime. Where the system exposes storage charges, minimum sizes or other conditions, add them to the ledger using the actual terms. [3]

A practical pilot before a purchasing commitment

Choose a permitted document set representative of the intended workload and retain content identifiers without exposing private text. Preserve the exact prefix construction, request timing and model identity. Compare the observed cached route with the corresponding uncached accounting under the same acceptance requirements.

Report the number of distinct prefixes, episodes and calls per episode. Separate customers or projects where the service isolates their caches. A pooled reuse count across boundaries that cannot share an entry exaggerates the opportunity. Keep unsuccessful requests and extra writes visible when they incurred cost.

Review output correctness and latency separately. A lower prefix charge does not establish that the complete workflow became cheaper or faster, and cache reuse does not authorize sending information to a service. The proposed experiment needs the same data permissions as ordinary processing.

For a buyer, the next question is straightforward: how many paid starts does the forecast contain, and what actual arrival evidence supports the reuse after each start? The downloadable five-call ledger makes that assumption reviewable. It offers no provider ranking and uses no live prices. Its contribution is the episode boundary that turns a vague promise of reuse into a reproducible economic calculation.

Use the worked example

Fixed-prefix synthetic caching costs across different arrival episodes. Charges exclude common suffix/output costs and use no provider rates or claimed cache-hit measurements.

To check the arithmetic and CSV/JSON agreement locally, save both files beside the Python verification script and run python3 verify.py q17.json. Python 3 is required; no third-party packages are needed. The check does not verify source claims or provider performance.

These are downloadable research records. They do not connect to an account, execute a trade or provide live market data.

Frequently asked questions

Does repeated text guarantee a cache hit?

No. Matching, timing, isolation and supported model/API behavior determine eligibility. Reconcile predicted hits with actual usage fields.

Does the example use current provider prices?

No. All charges are invented accounting units, and only the fixed prefix is priced.

What should a cache savings forecast record?

The exact prefix construction, relevant service rules, calls per usable episode, write/read usage and the complete costs that differ between routes.

Continue the research

Optional research services and tools

The free example above can be used without buying a product. For a defined team question, the DN Research Desk offers separately agreed documentary briefs, source registers and worked examples. Scope, fee, delivery date and usage terms are agreed before work begins; an enquiry creates no payment obligation.

Commercial disclosure: DN’s own service and any referral relationship are separate from the research method. No provider paid for a favourable finding in this article.

Sources and review scope

Sources reviewed on 5 December 2026. Review dates are distinct from each source’s observation, publication and effective dates.

  1. Claude: Prompt caching. Cache writes, reads, expiry and prefix matching require separate accounting; the example does not use vendor rates. Evidence: Provider documentation.
  2. Amazon Bedrock: Prompt caching. Supported caching modes and checkpoints depend on model/API; implicit cache hits are not guaranteed. Evidence: Provider documentation.
  3. Google Gemini API: Context caching. Implicit and explicit caching have distinct behavior and usage accounting; current support and charges are service-specific. Evidence: Provider documentation.

Corrections and limitations

To flag a possible error, use the DN contact route with this article’s URL, the disputed claim and the supporting source. The analysis is educational, not personalised investment, legal or tax advice. Documentation and synthetic examples do not establish realised returns or individual eligibility.

The DN briefing: what changed and why it matters

Follow documented changes in AI, crypto and financial technology, with practical analysis and source context. Unsubscribe anytime.