Part 1 of 6 · 1 min read
Why this page comes after the patterns
In this module you will
- Say what eviction and expiry are, and why a cache needs both.
- Trace LRU, LFU and FIFO on a short list of requests and name the entries removed.
- Choose a policy for a given access pattern.
- Set a TTL with the cost of staleness and the cost of reloads in view, and spread expiry times.
- Size a cache from item size, hot set and spare memory.
The patterns in module 2 decide how entries get in. This page decides how they leave. Memory is limited, and data changes, so every cache needs a rule for removing entries when it is full, and a rule for removing entries that are too old. The tier is Core. The numbers are made up to show the idea, unless the text names a book.