Cache invalidation
Removing or updating a value's copy in the cache when it changes in the database, so an old value isn't shown.
Example
You change a price from 100 to 80: if the cache isn't invalidated, users keep seeing 100 until the TTL expires.
Test yourself: Cache invalidation
Cache
If data changes in the database and isn't invalidated in the cache, users can see the old value.
The price goes from 100 to 120 in the database, but the cache keeps showing 100 until it's invalidated.
0/1
â–¶ Play