Build1 distinct publisher3 min readPublished
A dev.to writeup puts prompt caching at 70 to 80 percent off. Its own worked example implies about 90 percent at a perfect hit rate, and the gap is your miss rate, which timestamps and f-strings at the top of a system prompt create.
The Engineer · Build desk

Compiled by The EngineerSomething wrong?How this is made
Run the writeup's own example all the way to the end. A 10,000-token prefix, written once at 1.25x, costs 12,500 token-equivalents. The 999 matching reads at 0.1x cost 999,000. Total 1,011,500 against a no-cache baseline of 10,000,000 [7][8]. That is 89.9 percent off the prefix, not 70 to 80 [8]. The published band is discounting something the article does not name, and the obvious candidate is the miss rate.
So solve for it. If a hit costs 0.1 and a miss costs 1.25 because the miss also writes, expected per-call cost is 1.25 - 1.15h, which puts a 70 percent saving at a hit rate near 0.83 and an 80 percent saving near 0.91 [10]. That is a quantity you can measure rather than assume. The sample code prints usage.cache_read_input_tokens beside usage.input_tokens, which is the ratio to put on a dashboard before you promise finance a percentage [19].
The write premium itself is close to a rounding error. Caching beats not caching once 1.25 + 0.1(n-1) < n, which resolves at n above roughly 1.28 requests [9]. Two calls on the same prefix inside one cache lifetime and you are ahead. What the article never gives you is that lifetime. The only durability signal anywhere in it is the cache_control type "ephemeral" [20]. Break-even in requests is easy; break-even in requests per TTL is not derivable from this text.
The real adoption cost sits in the exact-match rule. One changed character in the cached portion invalidates the prefix, which forces stable content to the top and dynamic content to the bottom [5][6]. The kill-list opens with injecting a timestamp into the system prompt, which remains the cheapest known way to convert a cache into a bill [11]. The prescribed fix is to refactor a dynamically constructed system prompt into a fixed static string and pass per-user data as a user turn [12]. That is real work on prompt assembly, and it sits badly beside the claim that this "requires almost no refactoring" [13]. Attaching a marker to a history turn also means rewriting plain string content into a list of text blocks, so message plumbing changes too [17].
The multi-turn pattern deserves a closer read. Two markers: one on the system prompt, one at a fixed depth into history, default 10 [14]. The code places it at index history_len - history_cache_depth, and only when history is at least that long [15]. Because the marker is defined relative to the end of the list, its absolute index advances by one with every appended turn [16]. The article describes the marker as telling the provider to compute and store KV state up to that point, and says the next request reuses that state if its prefix matches exactly [21]. It does not say whether a longer request still hits the shorter prefix stored last turn. That behaviour is the whole question for the second marker, and you will have to test it against your provider.
One more transfer condition. The 70 to 80 percent figure is quoted on the prefix, not on the bill [7]. Total saving scales with the prefix's share of priced tokens, so a workload where the cacheable prefix is half the priced tokens sees about 45 percent, not 75 [22]. The article says both major providers expose this, one through a cache_control block in the request body and the other through cache_read_input_tokens in billing data, and that the mechanics differ slightly [18]. Slightly is doing some load-bearing work in that sentence.
Ranked by verification strength, evidence, and original report placement.
Prompt caching lets you mark a prefix of a prompt as cacheable; the provider stores the attention KV state for those tokens, and when the next request starts with the exact same prefix, processing is skipped and only cache read tokens are billed.
The article says the marker tells the provider to compute and store KV state up to that point and that the next request reuses the stored state if its prefix matches exactly, without describing partial hits on shorter stored prefixes.
Caching only works on exact prefix matches; one changed character in the cached portion invalidates the cache for that prefix.
The exact-match constraint requires prompts to be structured with stable content at the top and dynamic content at the bottom.
The article lists what kills cache hit rates in practice: injecting a timestamp or request ID into the system prompt, building system prompts with f-strings that include session-specific data, and appending per-user context to a shared instruction block.
The prescribed fix is to refactor a dynamically constructed system prompt into a fixed static string and pass per-user data as a user turn message instead.
Distinct publishers with included, body-backed reporting in this cluster.
dev.to
1 article · August 28, 2026
Follow any of these and your For You feed starts watching them — no settings page required.
build
Claude's prompt cache dies quietly in agent loops: the 20-block lookback nobody configures1 distinct publisher
build
Coding agents cost $4,125 a month because 73% of it is context you already sent1 distinct publisher
build
Tier the models; the validation boundary is the thing you are actually buying1 distinct publisher
build
Anthropic ships a cache differ, and concedes prompt caching was failing silently1 distinct publisher
Evidence-backed comparisons of source perspectives and observed adoption signals. Read the methodology
Which Builder, Operator, and Investor concerns the observed source mix emphasized—not a truth score.
Evidence, demonstrated adoption, hype gap, incentives, and confidence are assessed independently, each on its own current evidence. How these are measured.
One post, no price sheet
Every load-carrying number traces to a single dev.to writeup: the one-tenth read price, the 1.25x write premium, the assertion that both major providers do this. No rate card, no benchmark, no second byline. What keeps the score off the floor is that the author shows the work — 10,000 tokens, 1,000 requests, runnable code — so the arithmetic can be redone, and redoing it is exactly what breaks the headline.
No workload reports it
Nobody in this reporting says they switched prompt caching on and what their bill did next. The 'most teams' opener is impression, the 60-percent hit-rate floor is offered as a rule of thumb, and not one logged cache-read figure from a live workload appears. There is nothing to measure uptake against, so we do not score it.
Over-general title, under-sold ceiling
Two errors pointing in opposite directions. The title sells 70 percent off your LLM costs; the body's 70 to 80 percent applies only to the cached prefix, so a workload whose prefix is half the priced tokens lands nearer 45 percent overall. Yet run the post's own prices at a perfect hit rate and the prefix saving is closer to 90 percent — the quoted range silently assumes a miss rate the text never names. Put 'almost no refactoring' a few hundred words above instructions to rebuild your system prompt and re-type your message content, and the lean is toward overstatement, though modestly.
Consultancy byline, no vendor stake
This was published from a consultancy account on dev.to, and the incentive shows in the packaging rather than the substance: a round 70 percent in the headline, working code underneath, nothing steering the reader toward a product. No provider is named in a way that sells anything, and the actual advice — timestamps out of the system prompt, per-user data into the user turn — is cheap for the author to be right about.
Firm on the text, soft on the world
We are on solid ground about what the post says and about arithmetic anyone can redo: break-even at roughly 1.28 matching requests, the near-90-percent ceiling, the hit rates near 0.83 and 0.91 implied by the quoted range. We are on soft ground about the world outside it. The price ratios and the cross-provider claim are one writer's word, and the cache lifetime nobody states is precisely what decides whether a marker parked ten turns deep is ever hit again.