AI Prompts Library

Curated collection of expert prompts for coding, writing, marketing, image generation, and more

Have a great prompt? Submit it to the library →

Coding

Cache-Friendly Prompt Restructurer

Optimized for: any • PROMPT
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]

Prompt caching optimization

Want Custom Prompts?

Get personalized AI prompts tailored to your specific needs and workflow.

Contact Us