redis内存到达上限后的6种淘汰策略


maxmemory-policy noviction (内存到达上限后的处理策略)  

1、volatile-lru:只对设置了过期时间的key进行LRU(默认值)

2、allkeys-lru:删除LRU算法的key

3、volatile-random:随机删除即将过期的key

4、allkeys-random:随机删除

5、volatile-ttl:删除即将过期的

6、noeviction:永不过期,返回错误