Hacker News new | ask | show | jobs
by tbrownaw 29 days ago
It can evict other things for space reasons, sure. But it doesn't make their contents invalid.
1 comments

What's the difference between erasing a cache and invalidating it?
One doesn't have a piece of data, and the other has incorrect data.
But "cache invalidation" is unconcerned with that. The problem of looking for data and reading the wrong data in the belief that it's right is called "memory corruption". "Cache invalidation" is when you used to have data cached, but you no longer do. And the problem that this causes is that your data takes longer to find, not that it becomes inaccurate.

You'll notice that removing entries from the cache causes exactly the same effects as changing the data that backs them.