Update a profile name via two endpoints — one skips cache invalidation, leaving the cached view stale. Read from cache to detect the mismatch between live data and what users actually see.
Cache invalidation bugs occur when the cache is not updated after live data changes. Users continue to see old data until the cache expires naturally. This is common in CDN edge caches, in-memory caches, and API response caches when the update path forgets to bust the cache.
| Bug | Update via buggy endpoint → live data changes, cache stays stale |
| Correct | Update via correct endpoint → both live data and cache are updated |
| Read Cache | Shows cache vs live data — flags stale mismatch if detected |