[KongchangAI]
Conceptcontext caching

Context Caching

The practice of pre-storing recurring system prompts or long documents so that subsequent requests can reuse them at a lower unit price. It suits multi-turn question answering or fixed knowledge base scenarios and can reduce token costs.

Core Facts

Timeline (last 90 days)

Oct 21

DeepInfer's core mechanism is context caching, which keeps already-computed mathematical paths in memory, with a cache validity period exceeding 72 hours.

Unverified50%
Oct 19

Gemini API context caching comes in two forms: implicit caching (the system automatically identifies repeated prefixes) and explicit caching (developers actively create cache objects and specify a TTL).

Unverified50%
Oct 19

The context cache is fully readable before it expires and may be captured by logging systems or observability tools; revoking an API key does not trigger cache invalidation.

Unverified50%
Oct 13

When processing a long document of 8000 tokens, the KV cache may consume several additional GB of memory.

Unverified50%
Oct 13

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.

Verified70%
Oct 13

According to Anthropic's published prices (input $10, output $50, cache read $1, cache write $12.50 per million tokens), the example session in the article costs $16.88, of which cache reads account for 29.6%, cache writes 25.9%, fresh input 14.8%, and output 29.6%.

Expired60%
Oct 12

Conventional KV caching is an optimization within a single request: within the same conversation round, the KV generated from historical messages does not need to be recomputed, and only the newly input content is computed incrementally.

Verified65%
Sep 30

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.

Verified65%

All Facts (7)

Source Articles