For each database, you can choose from these data eviction policies:

Options Description
allkeys-lru Evicts the least recently used keys out of all keys
allkeys-lfu Evicts the least frequently used keys out of all keys
allkeys-random Randomly evicts keys out of all keys
volatile-lru (default) Evicts the least recently used keys out of keys with an "expire" field set
volatile-lfu Evicts the least frequently used keys out of keys with an "expire" field set
volatile-random Randomly evicts keys with an "expire" field set
volatile-ttl Evicts the shortest time-to-live and least recently used keys out of keys with an "expire" field set
no eviction Returns error if memory limit has been reached when trying to insert more data