Hermes Wiki

EvictionPolicies LRU LFU FIFO

When a cache is full, which entry gets removed to make room? LRU (least recently used), LFU (least frequently used), and FIFO (oldest inserted) are the standard eviction policies — a different concern from the read/write population strategies (cache-aside/write-through/etc.).

Why we need this / what value this brings

A cache with the wrong eviction policy either evicts data you're about to need again (hurting hit rate) or wastes memory holding data nobody wants anymore.

When to use this

Whenever a cache has a fixed size limit and needs to decide what to remove when full — every production cache eventually hits this.

How to use or implement this

LRU is the right default for most access patterns (recently used data tends to be used again); use LFU only when access frequency is a better predictor of future use than recency, and FIFO only when simplicity matters more than hit-rate optimization.

Research questions

  • Most managed caches (Redis with maxmemory-policy) let you pick this — has it ever been explicitly set for Localz's cache, or is it running on a default that may not fit the access pattern?

Empty folder — drop notes, links, and findings here as you research.

Hermes Wiki