[KongchangAI]
ConceptPrompt caching / 提示缓存

Prompt Caching

A prompt caching mechanism of the Anthropic API that caches the computation of repeated long prefixes, such as system prompts and document libraries. Cache hits are billed at a lower cache-read rate, while pricing tiers are based on the total number of prompt tokens.

Timeline (last 90 days)

Oct 18

According to a cross-vendor empirical comparison, reusing a 100,000-token prefix can reduce costs by 71% to 93%.

Unverified50%
Oct 18

Prompt caching takes effect in units of "prefix" and only works for content that is completely identical from the start; once a token in the middle changes, the content after it cannot hit the existing cache.

Unverified50%
Oct 16

A calculation example: asking 20 questions about a 50,000-token document requires about 1 million input tokens without prompt caching, and about 157,000 with caching, reducing input cost by about 84%, with faster time to first token as well.

Unverified50%
Oct 14

Prompt caching divides prefixes by 'breakpoints', and the prefix must be byte-for-byte identical to hit the cache, so it is critical to put unstable content such as timestamps and random IDs in the suffix.

Unverified50%
Oct 14

The price of prompt cache reads is only 0.05×–0.1× the normal input price (depending on the model), the Batch API enjoys a 50% discount when you can wait, and Anthropic charges an additional $10 per 1,000 searches for web search.

Unverified50%
Oct 11

A prompt cache hit requires the request prefix to be byte-for-byte identical to what was written at cache time; mixing dynamic content such as timestamps or session IDs into system prompts will cause frequent cache invalidation.

Unverified50%
Sep 29

In cache-intensive, long-context, multi-turn agent workflows, the incremental cost of switching to a more powerful model is diluted by cache reads and does not necessarily mean costs double.

Unverified50%

All Facts (7)

Unverified

According to a cross-vendor empirical comparison, reusing a 100,000-token prefix can reduce costs by 71% to 93%.

50%
Unverified

Prompt caching takes effect in units of "prefix" and only works for content that is completely identical from the start; once a token in the middle changes, the content after it cannot hit the existing cache.

50%
Unverified

A calculation example: asking 20 questions about a 50,000-token document requires about 1 million input tokens without prompt caching, and about 157,000 with caching, reducing input cost by about 84%, with faster time to first token as well.

50%
Unverified

Prompt caching divides prefixes by 'breakpoints', and the prefix must be byte-for-byte identical to hit the cache, so it is critical to put unstable content such as timestamps and random IDs in the suffix.

50%
Unverified

The price of prompt cache reads is only 0.05×–0.1× the normal input price (depending on the model), the Batch API enjoys a 50% discount when you can wait, and Anthropic charges an additional $10 per 1,000 searches for web search.

50%
Unverified

A prompt cache hit requires the request prefix to be byte-for-byte identical to what was written at cache time; mixing dynamic content such as timestamps or session IDs into system prompts will cause frequent cache invalidation.

50%
Unverified

In cache-intensive, long-context, multi-turn agent workflows, the incremental cost of switching to a more powerful model is diluted by cache reads and does not necessarily mean costs double.

50%

Source Articles