Coding PROMPT
Cache-Friendly Prompt Restructurer
July 26, 2026Optimized for: anyPrompt caching optimization
Restructure this prompt so prompt caching actually works on it. Caching only helps when the prefix is byte-identical across requests, and most prompts break that without realising. Do this: 1. Identify every part that is stable across requests and every part that varies. 2. Find the cache breakers: timestamps, request ids, user names, randomised example order, or anything dynamic sitting above stable content. 3. Reorder so all stable content comes first, in a fixed order, and everything variable comes last. 4. Mark where the cache breakpoint should be set. 5. Estimate the cached fraction before and after, and the resulting cost change. Call out anything that cannot move without changing behaviour, and say why. Prompt: [PASTE] What varies per request: [DESCRIBE]
Reorders a prompt for maximum cache hit rate and finds the dynamic values that silently invalidate the cache on every request.
Submit your own AI prompts to the community. The best ones get featured on TokenCalculator - and credited to you.