- In short
- Content ordering for cache hit rate means placing fixed instruction content ahead of per-request dynamic content, because dynamic content placed first changes the prefix on every call and prevents any cache hit. Reordering a prompt so the large fixed block comes first and the variable content comes last is often the single highest-leverage caching fix. A cache that never hits still incurs the full cost of the uncached prefix on every request, silently erasing the expected savings.
Order is the difference between saving and paying
Once you know that caching matches a leading, byte-identical prefix, the design rule follows immediately, and the Claude Certified Architect - Professional (CCAR-P) exam tests it at the apply level. Fixed instruction content must be placed ahead of per-request dynamic content. If dynamic content comes first, it changes the prefix on every call, and a changing prefix means no cache hit, ever. The prefix-matching mechanism makes ordering the single lever that decides whether caching does anything at all. Reorder correctly and a large fixed block is reused on every call; reorder wrongly and the same block is reprocessed and re-billed every time.
- Content ordering for cache hit rate
- Placing fixed instruction content ahead of per-request dynamic content so the leading prefix stays byte-identical across calls and the cache can hit. Dynamic content placed first changes the prefix on every call and prevents any hit. Reordering so the large fixed block comes first and the variable content comes last is often the highest-leverage caching fix, because a cache that never hits still charges the full uncached prefix on every request.
Fixed first, dynamic last
The rule is simple to state and easy to get backwards. The large fixed content, the system prompt, the instruction block, the reference material shared by every request, goes at the front. The per-request dynamic content, the specific document being analysed, the user's query, the account context, goes at the end. This keeps the leading portion identical across calls, which is precisely what caching needs to reuse it. The variable content at the tail changes freely without touching the prefix, so each request differs only after the cached portion ends.
Getting this backwards is a common and costly mistake, because it feels natural to put "the thing this request is about" first. But leading with the per-request document is exactly what changes the prefix every call and kills the cache. The fix, moving the large fixed block ahead of the variable content, is often the single highest-leverage caching change available, turning a cache that never hits into one that hits on nearly every call.
A cache that never hits still costs full price
The reason ordering matters so much economically is that a cache that never hits is not free failure; it is full-price failure. When the prefix changes every call, the cache cannot serve any of it, so every request incurs the full cost of the uncached prefix, exactly as if caching were not configured at all. Worse, the team believes caching is saving them money, so the erased savings are silent. The bill looks like the un-cached bill because it is the un-cached bill. That is why a caching cost problem is so often an ordering problem in disguise, not a pricing problem to escalate.
What the exam trips candidates on
The two traps are the ordering mistake and its misdiagnosis. The first is placing the per-request document or user query before the large fixed instruction block, breaking the stable prefix. A scenario will lead with the request-specific content; the credited reading reorders fixed-first. The second is diagnosing a caching cost problem as a pricing issue rather than a prompt-ordering issue. A scenario will frame the missing savings as a pricing or plan problem; the credited reading traces it to ordering and reorders.
Worked example
A team put their reusable analysis prompt into production expecting caching to cut cost, but saw none of the savings. Their prompt places the document being analysed at the top, followed by a large fixed instruction block. A manager suspects they are on the wrong pricing tier. Diagnose and fix it.
The manager's pricing suspicion is the second trap, and it is wrong. The bill matches the uncached cost not because of pricing but because the cache never hits, and the cache never hits because of ordering.
The prompt leads with the per-request document. Since caching matches a leading, byte-identical prefix, and the document changes on every request, the prefix diverges at the very first content on every call. The large fixed instruction block sits below the document, so it is never part of a stable leading prefix and is reprocessed and re-billed every request. The expected savings were erased silently: caching was configured, but its precondition, a stable leading prefix, was never met, so every request paid full price as if caching did not exist.
The fix is the highest-leverage caching change there is: reorder so the large fixed instruction block comes first and the per-request document comes last, with the cache breakpoint between them. Now the leading portion is identical across calls, the cache reuses the big fixed block on every request, and only the trailing document is processed fresh. The cost drops immediately, and it drops because of ordering, not because anyone changed pricing. Escalating to billing would have wasted time on a problem that lived entirely in the prompt's structure.
Common misreadings to avoid
Misconception
It's natural to put the request's document first, and caching will still reuse the fixed instructions below it.
What's actually true
Misconception
If caching isn't saving money, the problem is pricing or the plan.
What's actually true
How this shows up on the exam
Apply-level questions describe a caching setup that is not saving money and ask for the fix, often with a pricing red herring. The reliable answer places fixed instruction content ahead of per-request dynamic content to keep the prefix stable, and identifies the missing savings as an ordering problem rather than a pricing one.
This knowledge point applies prompt caching prefix matching as a concrete design rule, feeds the economic judgment in modeling cache economics and TTL tradeoffs, and complements the stable monolithic prefix in layering context strategies, which is cacheable for the same reason.
A reusable analysis prompt sees no caching savings. It places the per-request document at the top, followed by a large fixed instruction block. A manager suspects a pricing-tier problem. What is the correct fix?
People also ask
How do you order a prompt to maximise cache hits?
Why does putting the document first break caching?
Is a caching cost problem a pricing issue?
Watch and learn
Official Anthropic Academy lessons first, then hand-picked walkthroughs. Videos load only when you press play.
No videos curated for this concept yet
We are still curating the best official and community videos for this topic.
Official prep for this domain
Anthropic's own free prep module for this part of the syllabus, on the official prep course. Free with an Anthropic Academy sign-in.
References & primary sources
Master this concept with Archie
Practice it inside an adaptive study session. Archie, your Socratic AI tutor, tracks your mastery with Bayesian Knowledge Tracing and schedules the perfect next review.