Mission Control · API bay · §4.1
Prompt Caching Optimizer
Paste a prompt and we'll auto-segment it, classify each section stable / volatile, suggest the optimal cache_control breakpoint placement, and show the monthly savings across Anthropic, OpenAI, and Gemini.
1. Paste your prompt
2. Workload
Comma-separated labels to force-mark as volatile (case-insensitive).
3. Verdict
Total tokens
226
Cacheable prefix
214
Saved per call
$0.0006
Reorder needed?
YES
- ›Prompt is 226 tokens — below Anthropic's ~1024-token minimum for cache_control. Add stable reference material or skip caching.
- ›Reorder would lift cacheable prefix from 0 → 214 tokens.
6. Reordered prompt (copy this)
How the optimizer thinks
Cache works on prefixes, not on chunks. If a single volatile block sits before your stable reference docs, NONE of those docs are cacheable. Stable-first ordering is the whole game.
Auto-segmentation honors structure. The optimizer prefers XML tags (<context>, <example>), markdown headings, and role markers (User:, Context:) as section boundaries.
Anthropic minimum is ~1k–2k tokens. Cache_control on a short prompt is a no-op. The optimizer flags this — don't pay for the cache-write overhead if you're under the floor.
Up to 4 breakpoints. Anthropic accepts 4 cache_control breakpoints per request. The optimizer suggests the primary one (after the last stable block) plus secondaries when stable content is unusually large.