[KongchangAI]
Concept提示词缓存 / Prompt Cache

Prompt Caching

A pricing optimization mechanism introduced by Anthropic that applies token-level cost discounts to reusable fixed-prefix portions of requests, such as system prompts, passing on savings from KV cache reuse to the billing structure.

Core Facts

Timeline (last 90 days)

Oct 19

To achieve a high cache hit rate with prompt caching, stable content must be placed at the front of the prompt and variable content at the end, while keeping the request prefix byte-for-byte identical.

Unverified50%
Oct 19

The cost of the fixed context can be approximated as: number of fixed-prefix tokens × number of calls × cache-read unit price.

Unverified50%
Oct 19

Prompt Caching is a mechanism provided by large-model service providers such as the Anthropic API: when the request prefix is exactly the same as that of a previous request, the server reuses the already-computed KV Cache, the cache-hit portion is billed at 0.1 times the input price, and the first cache write is billed at 1.25 times.

Unverified50%
Oct 18

The three-step cost optimization path: first identify shareable prefixes to assess cache hit potential, then migrate non-real-time tasks to the batch channel, and finally confirm the target platform's discount stacking rules.

Unverified50%
Oct 18

The first prompt cache request is still billed at full price, and cache writes are sometimes priced separately.

Unverified50%
Oct 18

Sharing cached prompts across four models produced cost savings of 78–80%.

Unverified50%
Oct 18

Core decision rule: any content that changes per message must be placed after the last cache breakpoint, and the only reliable check is comparing two real requests rather than a single request.

Unverified50%
Oct 17

Production-grade agents typically combine five strategies: Prompt Caching, Compaction, Tool-result Clearing, Retrieval, and Subagents.

Unverified50%
Oct 17

Anthropic's Prompt Caching marks cache breakpoints via the cache_control field, allowing {"type": "ephemeral"} to be set on system prompts, tool definitions, or message blocks.

Unverified50%
Oct 17

Anthropic's cache prefix must be exactly identical; any subtle change (such as a timestamp or random ID) will invalidate the cache.

Unverified50%

40 more timeline events

All Facts (20)

Verified

The Claude API supports a Prompt Caching mechanism, where content is billed at full price on the first request, and subsequent tokens that hit the cache cost approximately 10% of the original price

80%
Verified

The Prompt Caching mechanism can reuse the KV Cache of identical prefix contexts, typically reducing input token costs by 50%–90%.

80%
Verified

The cache is not permanently valid; providers usually have a TTL of a few minutes to an hour, and the hit rate fluctuates with user behavior.

75%
Verified

The core principle of prompt caching is cross-request reuse of the KV Cache, where already-computed KV states can be cached and reused when multiple requests share the same prefix.

75%
Verified

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%
Verified

On most Claude models, Anthropic bills cache reads at 0.1× the base input price; default 5-minute cache writes at 1.25×; 1-hour cache writes at 2×; and a 5-minute cache entry is refreshed for free each time it is used.

70%
Verified

Prompt Caching is a cost-optimization mechanism introduced by mainstream LLM providers (such as Anthropic and OpenAI): when the prefix portion of multiple requests is completely identical, the provider caches that portion of the computation, and tokens that hit the cache are billed at a price far below normal input.

65%
Verified

Prompt caching saves the KV state of reusable prefixes (the tokens at the beginning of a prompt that remain unchanged); if the next request starts with an identical prefix, the provider reuses the saved computation and only processes the new portion.

65%
Verified

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.

65%
Verified

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.

65%
Verified

Prompt Caching refers to LLM service providers caching repeatedly occurring prefix content in requests, with cache hits reducing computational cost and latency.

65%
Verified

Some service providers have introduced cache-hit pricing, charging at a lower discounted rate when repeated long system prompts hit the cache.

65%
Verified

The caching mechanism is technically commonly referred to as KV Cache or Prompt Caching

65%
Verified

In cache hit scenarios, hit tokens are typically charged at 1/10 of the original price or even lower

65%
Verified

The disk caching mechanism persists already-computed KV Cache to storage media; when a subsequent request's prefix hits the cache, it can be reused directly, skipping redundant forward propagation.

65%
Verified

The general principle for achieving cache hits is to keep the prefix of the request context as stable as possible, placing fixed content such as system prompts and tool definitions at the very front, with per-turn user input appended at the end.

65%
Verified

Prompt Caching reduces latency and token costs by reusing the KV Cache of identical prefixes to skip redundant computation.

65%
Unverified

Anthropic's Prompt Caching can reduce repeated input costs by 90%

80%
Unverified

Prompt caching technology stores KV matrices in high-speed memory, and when the next request contains the same prefix content, it reads directly from the cache, skipping recomputation.

70%
Unverified

Prefix matching requires that only a contiguous sequence starting from the first token that is completely identical can hit the cache.

70%

Source Articles