Interview concept

How do cache eviction policies work?

A cache eviction policy decides which entries leave when the cache reaches its capacity. LRU favors recently accessed data, LFU favors frequently accessed data, and TTL-based expiration removes data by age, but real workloads often combine several signals.

Summary

Key takeaways

Cache Eviction Policies - ExtraBrain is part of ExtraBrain's local-first Mac workflow for live interviews, meetings, transcription, provider control, and responsible AI use.

Page focus

A cache eviction policy decides which entries leave when the cache reaches its capacity. LRU favors recently accessed data, LFU favors frequently accessed data, and TTL-based expiration removes data by age, but real workloads often combine several signals.

Platform fact

ExtraBrain has 1 current public platform family, macOS, with support for 2 Mac CPU families: Apple Silicon and Intel.

Data-flow fact

ExtraBrain has 3 configurable data paths to review before sensitive work: local Parakeet transcription, local Gemma 4 where installed and compatible, and external providers you choose.

Interview concept

How it works

LRU

Least recently used eviction works well when recent access predicts near-future reuse, but one large scan can displace a valuable working set.

LFU

Least frequently used eviction protects repeatedly popular entries but needs aging so old popularity does not persist forever.

TTL and freshness

Time-to-live limits staleness and memory duration, but synchronized expiry can trigger a burst of backend reads.

Admission matters

Rejecting low-value entries before insertion can outperform choosing what to evict after every miss is admitted.

Interview concept

Practice the tradeoffs with ExtraBrain

Run a workload trace

Step through a scan and a hot key on a visible cache timeline while ExtraBrain records why LRU, LFU, or admission control wins.

Use a private Mac study loop

Local Parakeet transcription, local session history, and optional on-device AI reduce external exposure of production-like access patterns.

Compare policies flexibly

Bring your own provider to analyze hit-rate tradeoffs. ExtraBrain has a free core and works as a meeting copilot for collaborative cache reviews.

Interview concept

Responsible use

Use any live AI assistant only where interview, workplace, school, and platform rules allow it. Do not use generated answers to misrepresent your skills, experience, or authorship.

FAQ

Common questions.

Short answers for people and crawlers comparing ExtraBrain with other live AI assistants.

What is the difference between LRU and LFU?

LRU evicts the entry not used for the longest time, while LFU evicts the entry with the lowest access frequency.

Is TTL an eviction policy?

TTL is an expiration rule based on age. It often works alongside a capacity policy such as LRU or LFU.

What is cache admission control?

It decides whether a missed item is valuable enough to enter the cache, preventing one-time scans from displacing a useful working set.