1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-08-01 16:28:03 +08:00

Update redis-all.md

This commit is contained in:
guide 2020-07-17 21:04:58 +08:00
parent 48848abb06
commit 8d29bcd721

View File

@ -252,10 +252,10 @@ Redis 配置文件 Redis.conf 中有相关注释,我这里就不贴了,大
**Redis 提供 6 种数据淘汰策略:**
1. **volatile-lru**从已设置过期时间的数据集server.db[i].expires中挑选最近最少使用的数据淘汰
1. **volatile-lruleast frequently used**从已设置过期时间的数据集server.db[i].expires中挑选最近最少使用的数据淘汰
2. **volatile-ttl**从已设置过期时间的数据集server.db[i].expires中挑选将要过期的数据淘汰
3. **volatile-random**从已设置过期时间的数据集server.db[i].expires中任意选择数据淘汰
4. **allkeys-lru**:当内存不足以容纳新写入数据时,在键空间中,移除最近最少使用的 key这个是最常用的
4. **allkeys-lruleast recently used**:当内存不足以容纳新写入数据时,在键空间中,移除最近最少使用的 key这个是最常用的
5. **allkeys-random**从数据集server.db[i].dict中任意选择数据淘汰
6. **no-eviction**:禁止驱逐数据,也就是说当内存不足以容纳新写入数据时,新写入操作会报错。这个应该没人使用吧!