Follow Discord
Sweep 06 Nov 2026 · 01:32Z Build v2.1.319 537 read Stable v2.1.311 Latest v2.1.319 Next v2.1.319 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

Request 2 caches its request content (not the response) changedbuild-with-claude/prompt-caching

Nearest release: v2.1.318, published 17 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+5added
Lines−5removed
From line 890 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits39to this page, all time

The whole hunk

from line 890, old and new numbered
/
lines
from line 890
890890 
891891You can use both 1-hour and 5-minute cache controls in the same request, but with an important constraint: Cache entries with longer TTL must appear before shorter TTLs (that is, a 1-hour cache entry must appear before any 5-minute cache entries).
892892 
893When mixing TTLs, the API determines three billing locations in your prompt:
893When mixing TTLs, the Claude API determines three billing locations in your prompt:
894894 
8951. Position `A`: The token count at the highest cache hit (or 0 if no hits).
8962. Position `B`: The token count at the highest 1-hour `cache_control` block after `A` (or equals `A` if none exist).
8951. Position `A`: The token count at the last cache hit in your prompt (or 0 if no hits). A hit on an entry cached with a 5-minute TTL doesn’t count if a 1-hour `cache_control` block after it is a cache miss.
8962. Position `B`: The token count at the last 1-hour `cache_control` block after `A` (or equals `A` if none exist).
8978973. Position `C`: The token count at the last `cache_control` block.
898898 
899899<Note>
900 If `B` or `C` is larger than `A`, it is necessarily a cache miss, because `A` is the highest cache hit.
900 If `B` or `C` is larger than `A`, it is necessarily a cache miss.
901901</Note>
902902 
903903You are charged for:
Feedback