Back to Prompts
Coding Assistant

Full Caching Strategy

For apps that need to handle high traffic From the Caching AI Coding Building Block.

Prompt
Design a multi-layer caching strategy for my app. I have performance issues at scale and need caching at multiple levels:

1. Database query caching, for repeated queries
2. Page/fragment caching, for rendered HTML or component output
3. CDN caching, for static assets and public pages

Requirements:
- Each layer should have independent TTL and invalidation
- Cache warming on deploy for critical paths
- A simple way to flush specific caches when content updates
- Monitoring: hit rate, memory usage, stale serves

My app: [describe your app and stack]

I'm learning, so explain each part simply.
4 views 0 copies