Eviction Policies
Here’s a bit of cache jargon I’m going to use going forward. The common term for deleting something from the cache is to evict it. (It sounds harsh, I know.) Similarly, an eviction policy is an algorithm that decides what data we should evict from the cache.
Computer scientists have proposed a whole slew of different eviction policies over the years. However, the trick is to find the most efficient eviction policy for our cache. To define what it means for an eviction policy to be efficient, let me first introduce a few more caching terms.
Recall that each time an application makes a request for data, it first checks to see if the data is in the cache. If it is, this is called a cache hit. Cache hits are good since it means ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access