Database · Medium
How does Redis handle eviction policies and TTL expiry?
DatabaseNoSQLSenior
Answer preview
Two different mechanisms remove keys. Expiry deletes keys whose TTL has passed. Eviction kicks in only when memory reaches maxmemory, and removes keys to make room according to a configured policy.…