Redis Key Expiration Policy

Source: Internet
Author: User
Tags allkeys

Redis's Official Conf

Https://raw.github.com/antirez/redis/2.2/redis.conf

The specific way in which the expiration policy is in 6.
The default expiration policy in Redis is VOLATILE-LRU. Setup mode

Config set Maxmemory-policy Volatile-lru



Maxmemory-policy six different ways

    1. VOLATILE-LRU: LRU (default) only for keys that have an expiration time set
    2. ALLKEYS-LRU: Delete the LRU algorithm key
    3. Volatile-random: Randomly delete expiring key
    4. Allkeys-random: Random Delete
    5. Volatile-ttl: Delete the expiring
    6. Noeviction: Never expires, returns an error

Redis Key Expiration Policy

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.