liveBook · Manning

Eviction policy

An eviction policy is a rule for selecting stored items to remove when capacity, retention, or resource constraints require their removal.

How 2 Manning books explain it

Fast by Default

An eviction policy defines which retained data or cached entries are removed when a resource bound is reached.

How it is used
Keeps caches and retained application state within explicit memory bounds as usage and data grow.
How deep it goes
Gives implementation guidance through size limits, LRU and last-access rules, monitoring, and long-session testing without algorithm internals.
Examples
Uses growing caches, distributed profile invalidation, photo-editor undo copies, and document caches evicted by last access.
What you can do after
Apply it by setting bounded cache and retained-state limits, selecting removal rules, and monitoring memory growth over extended sessions.

Read how Fast by Default explains eviction policy →

Advanced Algorithms and Data Structures

An eviction policy is a rule for selecting an element to remove from a full cache when space is needed for a new entry.

How it is used
Controls which cache entry is purged when fixed capacity must make room for a new entry.
How deep it goes
Defines the rule, compares LRU and LFU, and traces priority-queue implementation trade-offs without covering concurrency design in detail.
Examples
Uses least-recently-used removal, frequency counters, timestamps, priority queues, heaps, and custom age- or importance-weighted metrics.
What you can do after
Build a cache policy by selecting a retention metric and matching it with lookup and ordering data structures.

Read how Advanced Algorithms and Data Structures explains eviction policy →

Also covered in

What to know first

Related concepts

Questions about eviction policy

What is eviction policy?

An eviction policy is a rule for selecting stored items to remove when capacity, retention, or resource constraints require their removal.

Which Manning books explain eviction policy?

Fast by Default and Advanced Algorithms and Data Structures.

What should I know before learning eviction policy?

Manning books that teach eviction policy usually introduce caching and memory first.

What kinds of eviction policy are there?

Kinds of eviction policy include volatile-lru.

What is eviction policy a kind of?

Eviction policy is a kind of policy. A policy is a rule, principle, or decision function that governs behavior or determines actions or permissions under specified conditions.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.