0
0
Redisquery~5 mins

Eviction policies overview in Redis - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is an eviction policy in Redis?
An eviction policy in Redis decides which keys to remove when the memory limit is reached to make space for new data.
Click to reveal answer
beginner
Explain the noeviction policy in Redis.
The noeviction policy means Redis will return an error when memory is full and no keys are removed.
Click to reveal answer
intermediate
What does the allkeys-lru eviction policy do?
The allkeys-lru policy removes the least recently used keys from all keys in Redis to free memory.
Click to reveal answer
intermediate
Describe the difference between volatile-lru and allkeys-lru policies.
volatile-lru removes least recently used keys only among keys with an expiration set, while allkeys-lru considers all keys.
Click to reveal answer
intermediate
What is the purpose of the volatile-ttl eviction policy?
The volatile-ttl policy removes keys with the shortest time to live (TTL) first, but only among keys with expiration set.
Click to reveal answer
Which Redis eviction policy returns an error when memory is full?
Avolatile-lru
Ballkeys-lru
Cnoeviction
Dallkeys-random
What does the allkeys-random eviction policy do?
ARemoves keys with shortest TTL
BReturns error on memory full
CRemoves least recently used keys with expiration
DRemoves random keys from all keys
Which eviction policy only removes keys with an expiration set?
Avolatile-lru
Ballkeys-lfu
Cnoeviction
Dallkeys-random
What does LRU stand for in eviction policies?
ALeast Recently Used
BLast Random Update
CLongest Running User
DLatest Redis Update
Which eviction policy removes keys with the shortest time to live first?
Anoeviction
Bvolatile-ttl
Callkeys-lru
Dallkeys-lfu
Explain how Redis eviction policies help manage memory when it is full.
Think about what happens when Redis runs out of memory.
You got /4 concepts.
    Describe the difference between allkeys-lru and volatile-lru eviction policies.
    Focus on which keys each policy targets.
    You got /3 concepts.