Redis is configured with the allkeys-lru eviction policy and maxmemory is reached. Which keys are removed first?
Think about what 'LRU' stands for in cache eviction.
LRU means Least Recently Used. Redis removes keys that have not been accessed for the longest time first.
Redis is set to allkeys-lfu eviction policy. When memory is full, which keys get evicted?
LFU stands for a frequency-based eviction.
LFU means Least Frequently Used. Redis removes keys that have been accessed the fewest times first.
Choose the correct Redis config line to set eviction policy to allkeys-random.
Check the exact spelling and format of Redis eviction policies.
The correct Redis config uses hyphens and the exact policy name: allkeys-random.
Consider Redis workloads with many keys accessed only once. Why could LFU eviction cause problems compared to LRU?
Think about how frequency counters behave over time.
LFU counts how often keys are accessed but frequency counters may not decay fast, so some rarely used keys stay longer, reducing cache efficiency.
You add maxmemory-policy allkeys-lrux to your Redis config and restart. What happens?
Invalid config options usually cause startup errors.
Redis logs a warning for the unknown maxmemory-policy and overrides it with 'noeviction', allowing the server to start.