当前位置:网站首页>Redis Key没设置过期时间,为什么被主动删除了
Redis Key没设置过期时间,为什么被主动删除了
2022-07-23 10:53:00 【一只小小狗】
Redis已使用超过了内存限定,maxmemory ,触发主动清理策略。
8中淘汰策略
过期的key
- volatile-lru:从已设置过期时间的数据集(server.db[i].expires)中挑选最近最少使用的数据淘汰
- volatile-ttl:从已设置过期时间的数据集(server.db[i].expires)中挑选将要过期的数据淘汰
- volatile-random:从已设置过期时间的数据集(server.db[i].expires)中任意选择数据淘汰
- volatile-lfu:会使用LFU算法筛选设置了过期时间的键值对。
所有的key
- allkeys-lru:从数据集(server.db[i].dict)中挑选最近最少使用的数据淘汰
- allkeys-lfu:会使用LFU算法队所有数据进行筛选删除、。
- allkeys-random:从数据集(server.db[i].dict)中任意选择数据淘汰
不处理
- no-enviction(驱逐):禁止驱逐数据,新写入操作会报错
如有错误欢迎指正
边栏推荐
猜你喜欢

printf函数-转换说明
[email protected]]#颜色"/>修改ssh命令行[[email protected]]#颜色

uniapp路由跳转的六种方式
[email protected] ]Color"/>Modify SSH command line[ [email protected] ]Color

Completely uninstall MySQL in centos7

多线程一定能优化程序性能吗?

【7.16】代码源 -【数组划分】【拆拆】【选数2】【最大公约数】

VSCode 更新后与tab相关快捷键无法使用

深入理解L1、L2正则化

C语言经典例题-用4×4矩阵显示从1到16的所有整数,并计算每行、每列和每条对角线上的和
随机推荐
double类型精度丢失问题以及解决方法
bgp选路原则
Les raccourcis clavier liés à l'onglet ne peuvent pas être utilisés après la mise à jour du vscode
Error | cannot read property '_ normalized‘ of undefined
uniapp实现横向点击滑动菜单
C # calculate the number of times a character appears in the string
第三篇 RBAC权限管理 数据库设计详解
[hiflow] regularly send Tencent cloud SMS sending group
Xlswriter - Excel export
idea一次启动多个项目
OPNsense – 多功能高可靠易使用的防火墙(二)
数据治理浅析
Start other independent programs through fmmonitoredprocess in unreal
什么是服务器托管及和虚拟主机的区别
BGP federal experiment
第一篇 项目基本情况介绍
STL deque
Deep understanding of L1 and L2 regularization
广州举办镇街农产品质量安全监管员大比武
Clickhouse, let the query fly!!!