GameCachingBeginnerCache hits, misses, LRU, TTL, and stale datacacheLRUTTLhit rateGamePractice cache hits, misses, LRU eviction, TTL, stale data, cache warming, and hit rate through an interactive backend caching game.Cache Eviction LabCachingBeginnerCache hits, misses, LRU, TTL, and stale data/games/cache-eviction-lab/
Predict cache hits and misses as requests flow through an LRU cache, then experiment with TTL behavior and stale data tradeoffs.
Concept
Cache hits, misses, LRU, TTL, and stale data
Difficulty
Beginner
Play time
5-8 minutes
Path
Data & Performance
Interactive scenario
Playable game area: Make the next backend decision
Use the controls below. Feedback appears immediately and final scores stay in this browser.
Concept notes
Why this decision matters
Cache Eviction Lab is focused practice for Cache hits, misses, LRU, TTL, and stale data. It explains why each answer is safe, risky, or production-ready.
Caching is a tradeoff between speed, capacity, and freshness. This lab makes those moving parts visible through a small request sequence.
Learning objectives
Predict cache hits and misses from a request sequence.
Visualize LRU eviction as cache capacity fills.
Understand how TTL changes freshness and hit rate.
How to play
Read the cache scenario and its evidence about recent use, expiry, or capacity.
Choose one strategy that best addresses the cache behavior described.
Select Submit decision, read the explanation, then choose Next challenge or Finish run.
The gauges illustrate the scenario; they do not measure live cache hits or misses.
Scoring
Your score ranges from 0 to 1000 and reflects the quality of your decisions.
Consistently strong decisions at harder difficulty levels earn an extra bonus.
Completing all eight decisions adds a completion bonus.
Response time does not affect your score. Take time to read the evidence and explanations.
Backend concept notes
A cache hit avoids slower work, such as database reads or remote API calls. A miss repopulates the cache and may evict another item.
LRU evicts the least recently used item. TTL expires items based on age, which can protect freshness but reduce hit rate.
Common mistakes
Thinking cache capacity is unlimited.
Forgetting that reading an item updates its recency in LRU.