See real-time cache stats across all models on the Rankings page.
How It Works
- First request: Full prompt is processed and cached by the provider
- Subsequent requests: Cached prefix is reused — up to 90% cheaper and 80% faster
Real-World Impact
Based on production data from the Kyma community (7-day rolling window):- 22%+ overall cache hit rate across all models
- deepseek-v3 leads with 56% cache hit rate — heavy agentic usage
- gemini-2.5-flash and gemma-4-31b consistently hit 20-35%
- Coding agents (OpenClaw, Cline, Roo Code) see the highest cache rates due to repeated system prompts
Automatic Caching
For OpenAI-compatible requests, caching is automatic when your prompt exceeds 1,024 tokens. Place static content (system prompt, tool definitions) at the beginning:Best Practices
Structure prompts for caching
Place stable content first, dynamic content last:For coding agents
Coding agents (OpenClaw, Cline, Roo Code, Claude Code) automatically benefit from caching because they send the same system prompt + tool definitions with every request. Real production example — 50-request coding session with deepseek-v3:What to avoid
- Don’t put timestamps or request IDs in system prompts — breaks cache
- Don’t reorder tool definitions between requests
- Keep system prompt identical across requests
Cache Stats in Response
Kyma normalizes cache statistics from all providers into a unified format:
These fields appear in both streaming (final usage chunk) and non-streaming responses.
Tracking Your Savings
Per-request
Every API response includesusage.cost (what you paid) and usage.cache_discount (what you saved). Sum these over your session to track total savings.
Community-wide
Visit the Cache Stats rankings to see:- Overall cache hit rate across all Kyma users
- Per-model cache breakdown (cached vs uncached vs output tokens)
- Total community savings in USD
Supported Models
All models on Kyma support prompt caching. Cache effectiveness varies by model — Kyma normalizes the behavior so you always see the samecached_tokens shape and the same 90% discount.
Check which models are actively caching:
Pricing
Cached tokens are charged at 10% of the normal input price (90% discount).
Example — deepseek-v3 pricing:
50-request coding session breakdown:
usage.cost and usage.cache_discount fields in every response let you track savings in real-time.