EXPIRE AND LRU CACHE
• Volatile Key (Db.c)
– When the key is set to a new value using the SET command, or when a
key is destroyed via DEL, the timeout is removed from the key.
• Enhanced Lazy Expiration algorithm
– Redis does not constantly monitor keys that are going to be expired.
Keys are expired simply when some client tries to access a key, and the
key is found to be timed out.
• Work as LRU cache (memcached)
– Maxmemory/maxmemory-policy
– When memory limit was already reached, server will remove some old
data deleting a volatile key, even if the key is still far from expiring
automatically.
– Random get keys, delete by lru rules.