Prompt Caching
A cost and efficiency optimization mechanism in large language model inference that stores previously computed KV Cache entries and reuses them when a matching prefix is detected. By avoiding redundant prefill computation, this approach reduces time-to-first-token latency and lowers API call costs for workloads that share common prompt prefixes.
Core Facts
Token caching (Prompt Caching) is a cost-optimization mechanism in large model APIs; when the same prefix appears repeatedly across multiple requests, the computation result can be cached and charged at a lower rate.
The cache read mechanism retains the KV cache for recurring long prompt prefixes, charging at an extremely low rate upon a cache hit; the leaked cache read price for Opus 5.5 is approximately 1/20 of the input price.
Prompt caching requires the request prefix to match byte for byte, and caches usually have a time to live (such as 5 minutes to 1 hour), after which they must be written again.
Timeline (last 90 days)
Prompt caching usually requires the prefix to be exactly identical and to reach a minimum length threshold, so the hit rate depends heavily on the prompt structure.
Cache hit rate (prompt caching) refers to the mechanism in AI APIs whereby repeatedly appearing prefix content is cached, and subsequent requests that hit the same prefix are billed at a lower price and responded to faster.
For long-session Agents, the key constraint of prompt caching is that the prefix must be stable: once some middle segment of history is rewritten or truncated, all subsequent cache is invalidated and the next round must be recomputed at full price.
The cache pricing strategies of mainstream AI providers (such as OpenAI and Anthropic) usually charge some storage fee for long caches but greatly reduce the input cost of repeated requests.
The 12-hour cache strategy is especially suited to scenarios such as customer service bots, content creation assistants, coding assistants and complex multi-turn conversations.
A mixed strategy: using the 12-hour cache to store shared instructions and the 30-minute cache to handle newer conversation content can balance reuse savings with avoiding long-cache fees for frequently changing parts.
If the same context needs to be reused repeatedly within a day, the reuse savings from a 12-hour cache may significantly exceed its extra cost.
The default 30-minute prompt cache suits fast, continuous conversations.
Different AI providers differ in cache granularity, hit conditions and billing methods; for example, some price cache-write tokens and cache-read tokens separately, and some set a minimum cacheable token length.
The original Reddit post describes that users now face three choices: stick with the default 30-minute cache, switch to a 12-hour cache, or use a mix of the two.
28 more timeline events
All Facts (20)
Token caching (Prompt Caching) is a cost-optimization mechanism in large model APIs; when the same prefix appears repeatedly across multiple requests, the computation result can be cached and charged at a lower rate.
80%VerifiedThe cache read mechanism retains the KV cache for recurring long prompt prefixes, charging at an extremely low rate upon a cache hit; the leaked cache read price for Opus 5.5 is approximately 1/20 of the input price.
80%VerifiedPrompt caching requires the request prefix to match byte for byte, and caches usually have a time to live (such as 5 minutes to 1 hour), after which they must be written again.
75%VerifiedPrompt caching is a capability of the Anthropic API: when the prefix portion of a request is exactly identical to the previous request, the server can reuse the already-computed intermediate state and skip redundant prefill computation.
75%VerifiedTo maximize cache hit rate, stable content (system prompts, file contents) should be placed at the prefix of the prompt, with dynamic content appended at the end
75%VerifiedWhether prompt caching hits depends on byte-for-byte consistency of the request prefix; if even one character at the beginning differs, the entire cache is invalidated.
70%VerifiedPrompt caching means the identical prefix shared by multiple requests is fully billed and processed only on the first request, and subsequent requests hitting the cache can lower the input token price and reduce latency; but caching cannot shorten the total context length, and long histories still occupy the context window and raise latency.
65%VerifiedPrompt cache validity typically ranges from only a few minutes to several hours, and discount rates and cache windows may be adjusted at any time.
65%VerifiedPrompt Caching refers to LLM service providers caching repeatedly occurring prefix content in requests, with cache hits reducing computational cost and latency.
65%VerifiedWhen multiple requests share the same prefix (such as a system prompt), efficient KV Cache reuse can significantly reduce computational overhead.
65%Partially VerifiedCache hit rate (prompt caching) refers to the mechanism in AI APIs whereby repeatedly appearing prefix content is cached, and subsequent requests that hit the same prefix are billed at a lower price and responded to faster.
75%Partially VerifiedIn Anthropic's API billing system, prompt caching allows a stable prefix to be marked as cached content, and subsequent identical prefixes directly reuse the KV without recomputing attention, with these tokens recorded as "cache reads".
75%UnverifiedPrompt caching relies on the Transformer's KV cache mechanism, skipping redundant computation by reusing already-computed KV vectors for identical prefixes, saving GPU compute and reducing time-to-first-token latency.
70%UnverifiedPrompt caching can reuse computation results for long contexts that recur, significantly reducing duplicate billing.
60%UnverifiedPrompt caching usually has an expiration period, requires rewriting after content changes, and the cache discount applies only to the input side, while output tokens are still billed at the standard rate.
60%UnverifiedA cache hit means the model server recognizes that the prefix of the current request highly overlaps with a previous request, and directly reuses the already-computed KV cache without re-running inference, thereby reducing the actual computation load.
60%UnverifiedIn large language model inference, KV-Cache is used to store the key-value pairs already computed in the attention mechanism, thereby avoiding repeated computation.
60%UnverifiedPrompt caching usually requires the prefix to be exactly identical and to reach a minimum length threshold, so the hit rate depends heavily on the prompt structure.
50%UnverifiedFor long-session Agents, the key constraint of prompt caching is that the prefix must be stable: once some middle segment of history is rewritten or truncated, all subsequent cache is invalidated and the next round must be recomputed at full price.
50%UnverifiedA mixed strategy: using the 12-hour cache to store shared instructions and the 30-minute cache to handle newer conversation content can balance reuse savings with avoiding long-cache fees for frequently changing parts.
50%