Excessive cache invalidation
- Caching
Problem Summary
Excessive cache invalidation defeats the purpose of caching by clearing the cache too often. Each invalidation forces regeneration from the origin, eliminating performance benefits.
Performance Impact
- Low cache hit ratio: Cache rarely serves content
- Constant regeneration: Origin generates same content repeatedly
- No performance benefit: Effectively no caching
- Increased server load: More origin requests
How to Detect
- CDN dashboard: Very low cache hit ratio
- Server logs: High cache purge frequency
- Monitoring: Cache invalidation alerts
Solutions
1. Set Appropriate Purge Rules
Only purge when content actually changes.
2. Use Stale-While-Revalidate
Cache-Control: public, max-age=3600, stale-while-revalidate=864003. Smart Purging
Purge specific URLs, not entire cache.
4. Increase Cache TTL
Longer cache duration between invalidations.