Hands-on task
A cache that never refuses writes
This Redis is a cache: losing old keys is no big deal, but an OOM command not allowed error is an outage for the application.
Configure it:
- memory limit 20 MB (
20mb); - eviction policy allkeys-lru — when full, delete the least recently used keys.
The settings must take effect now, without a restart, and be persisted in /etc/redis/redis.conf.
Open the config /etc/redis/redis.conf in the Editor tab.
- redis
- maxmemory
- maxmemory-policy
- allkeys-lru
- eviction
- CONFIG REWRITE