[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 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%.

Unverified50%

All Facts (5)

Source Articles