Debugging Stale Data
When users report stale data, determine which cache layer is responsible before changing code. Check browser caching, CDN behavior, framework data caching, route output caching, database replicas, and application-level caches.
A useful debugging technique is to trace one request from browser to database and identify where the old value is introduced.
Avoid solving every stale-data problem by disabling caching globally. That may fix freshness while destroying performance.
Key Takeaways
Find the stale layer before changing caching configuration.
Cache invalidation should follow data dependencies.
Freshness and performance must be balanced.