prompt

Caching Invalidation Designer

Plan cache invalidation strategies to prevent stale data while minimizing performance impact.

Updated June 2026
The prompt
Design a caching invalidation strategy for:

Data model: {{data_model_description}}
Cache layers: {{cache_layers}} (e.g., CDN, Redis, app-level)
Data mutation patterns: {{mutation_patterns}}
Consistency SLA: {{consistency_sla}}

Provide:
1. Invalidation trigger points (write-through, event-based)
2. TTL recommendations per cache layer
3. Partial vs. full invalidation trade-offs
4. Stale-while-revalidate approach (if applicable)
5. Stampede prevention (thundering herd)
6. Monitoring metrics (hit rate, staleness)
7. Rollback plan for incorrect invalidation

Minimize {{optimization_priority}}.
Did it work? Rate this prompt

Variables

Description of data entities and relationships
Cache infrastructure (CDN, Redis, app-level, etc.)
How and how often data changes
Maximum acceptable staleness (e.g., 5 seconds)
Priority (latency, cost, consistency)

Details

Author

AI Khazna

License

Security

Type

prompt

Related assets

More curated picks in Development & Code.

Audit before you install

Run any source through our checks - AI visibility, security, performance, and stack detection.

More in Development & Code