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
Whether 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.
Prompt cache validity typically ranges from only a few minutes to several hours, and discount rates and cache windows may be adjusted at any time.
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.
Timeline (last 90 days)
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.
As prompt caching technology matures, more flexible cache duration options, and even automatically optimized cache strategies, may emerge.
The Reddit user discussion reflects the widespread demand among users for more flexible control over cache duration to suit different workflows.
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.
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.
The spread of model routing and prompt caching directly lowers Token consumption per request, thereby flattening the total Token curve while call volume grows.
21 more timeline events
All Facts (20)
Whether 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 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%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.
65%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%UnverifiedThe 12-hour cache strategy is especially suited to scenarios such as customer service bots, content creation assistants, coding assistants and complex multi-turn conversations.
50%UnverifiedThe Reddit user discussion reflects the widespread demand among users for more flexible control over cache duration to suit different workflows.
50%UnverifiedDifferent 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.
50%UnverifiedThe 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.
50%UnverifiedThe default 30-minute prompt cache suits fast, continuous conversations.
50%UnverifiedThe 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.
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%UnverifiedPrompt caching can reuse computation results for long contexts that recur, significantly reducing duplicate billing.
50%UnverifiedPrompt caching typically has a short lifetime (on the order of minutes) and is keyed by provider, model, and content prefix.
50%UnverifiedAfter switching providers, the new provider's cache does not contain the previous prefix, and the entire context must be processed again at full price.
50%UnverifiedMajor large-model providers (such as Anthropic and OpenAI) all support server-side caching of request prefixes, and the prefix portion of subsequent requests that exactly matches the cached content can be billed at a discount and need not be recomputed.
50%UnverifiedPrompt 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.
50%UnverifiedIn RAG scenarios, the retrieved context changes with every query, and if it is placed early in the prompt it breaks cache hits for subsequent content, so the static system prompt is usually placed first to benefit from caching, with dynamic retrieved document chunks placed later.
50%UnverifiedPrompt caching reuses the already-computed intermediate state of the same long context submitted repeatedly (such as a fixed large document or system prompt), thereby reducing the billing cost for that portion of the input.
50%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.
50%