Complete the code to set the eviction policy to Least Recently Used (LRU) in Redis configuration.
CONFIG SET maxmemory-policy [1]The allkeys-lru policy evicts the least recently used keys when memory is full.
Complete the code to set the eviction policy to Least Frequently Used (LFU) for volatile keys only.
CONFIG SET maxmemory-policy [1]The volatile-lfu policy evicts the least frequently used keys but only those with an expiration set.
Fix the error in the command to set a random eviction policy.
CONFIG SET maxmemory-policy [1]The correct policy name for random eviction of all keys is allkeys-random.
Fill both blanks to set the max memory to 100mb and eviction policy to allkeys-lfu.
CONFIG SET maxmemory [1] CONFIG SET maxmemory-policy [2]
Setting maxmemory to 100mb limits Redis memory usage, and allkeys-lfu evicts least frequently used keys from all keys.
Fill all three blanks to configure Redis to use 200mb max memory, volatile-lru eviction policy, and set a key expiration of 60 seconds.
CONFIG SET maxmemory [1] CONFIG SET maxmemory-policy [2] EXPIRE mykey [3]
We set maxmemory to 200mb, eviction policy to volatile-lru which evicts least recently used keys with expiration, and set expiration of 60 seconds on 'mykey'.