System Design · Middle · Question 11 of 75
Why is cache invalidation called one of the hardest problems?
- ✓Correct answer: Data lives in many caches and they must be updated consistently
- 2Browsers forbid clearing the cache programmatically
- 3A cache can't be cleared without restarting the server
Explanation
The same data sits in the CDN, the server cache, the client cache and on multiple pages. Tags (revalidateTag, key-based invalidation), short TTLs with SWR and event-driven invalidation after mutations help.