This topic describes the eviction policies of ApsaraDB for Redis.
The default eviction policy for ApsaraDB for Redis instances is volatile-lru. To modify the eviction policy for an instance, log on to the ApsaraDB for Redis console, click the instance ID on the Instances page to go to the Instance Information page, and then click System Parameters in the left-side navigation pane. For more information, see Configure instance parameters.
volatile-lru (default): evicts the LRU keys from keys that have a TTL configured regardless of whether the keys have expired.
volatile-lfu: evicts LFU keys from keys that have a TTL configured.
volatile-random: randomly evicts keys from keys that have a TTL configured.
volatile-ttl: evicts the keys that have the shortest TTL from keys that have a TTL configured.
allkeys-lru: evicts the LRU keys from all keys.
allkeys-lfu: evicts LFU keys from all keys.
allkeys-random: randomly evicts keys from all keys.
noeviction: does not evict keys to make space when the memory limit is reached, but returns errors for write operations.