Redis淘汰策略

失效策略上,Redis支持多大6种的数据淘汰策略:
1. volatile-lru:从已设置过期时间的数据集(server.db[i].expires)中挑选最近最少使用的数据淘汰;
2. volatile-ttl:从已设置过期时间的数据集(server.db[i].expires)中挑选将要过期的数据淘汰;
3. volatile-random:从已设置过期时间的数据集(server.db[i].expires)中任意选择数据淘汰 ;
4. allkeys-lru:从数据集(server.db[i].dict)中挑选最近最少使用的数据淘汰;
5. allkeys-random:从数据集(server.db[i].dict)中任意选择数据淘汰;
6. no-enviction(驱逐):禁止驱逐数据。

猜你喜欢

转载自blog.csdn.net/luoyoub/article/details/80694657