By default, an ApsaraDB for Redis instance evicts data by using the volatile-lru policy. To modify the eviction policy, log on to the ApsaraDB for Redis console, click the target instance ID on the Instance List page to go to the Instance Information page, and click System Parameters in the left-side navigation pane.

  • volatile-lru

    The system only evicts data that has Time To Live (TTL) configured according to the Least Recently Used (LRU) algorithm.

  • volatile-ttl

    The system only evicts data that has TTL configured, and evicts the data in ascending order of TTL.

  • allkeys-lru

    The system evicts data according to the LRU algorithm.

  • volatile-random

    The system only randomly evicts data that has TTL configured.

  • allkeys-random

    The system randomly evicts data.

  • noeviction

    The system does not evict any data, but returns an error when you write new data to the system.

  • volatile-lfu

    The system only evicts least frequently used keys that have TTL configured according to the Least Frequently Used (LFU) algorithm.
  • allkeys-lfu

    The system evicts least frequently used keys according to the LFU algorithm.