File tree Expand file tree Collapse file tree 1 file changed +0
-6
lines changed Expand file tree Collapse file tree 1 file changed +0
-6
lines changed Original file line number Diff line number Diff line change @@ -149,8 +149,6 @@ Redis中有个设置时间过期的功能,即对存储在 redis 数据库中
149
149
150
150
但是仅仅通过设置过期时间还是有问题的。我们想一下:如果定期删除漏掉了很多过期 key,然后你也没及时去查,也就没走惰性删除,此时会怎么样?如果大量过期key堆积在内存里,导致redis内存块耗尽了。怎么解决这个问题呢? ** redis 内存淘汰机制。**
151
151
152
-
153
-
154
152
### redis 内存淘汰机制(MySQL里有2000w数据,Redis中只存20w的数据,如何保证Redis中的数据都是热点数据?)
155
153
156
154
redis 配置文件 redis.conf 中有相关注释,我这里就不贴了,大家可以自行查阅或者通过这个网址查看: [ http://download.redis.io/redis-stable/redis.conf ] ( http://download.redis.io/redis-stable/redis.conf )
@@ -169,8 +167,6 @@ redis 配置文件 redis.conf 中有相关注释,我这里就不贴了,大
169
167
7 . ** volatile-lfu** :从已设置过期时间的数据集(server.db[ i] .expires)中挑选最不经常使用的数据淘汰
170
168
8 . ** allkeys-lfu** :当内存不足以容纳新写入数据时,在键空间中,移除最不经常使用的key
171
169
172
-
173
-
174
170
** 备注: 关于 redis 设置过期时间以及内存淘汰机制,我这里只是简单的总结一下,后面会专门写一篇文章来总结!**
175
171
176
172
@@ -289,8 +285,6 @@ Redis 通过 MULTI、EXEC、WATCH 等命令来实现事务(transaction)功能。
289
285
290
286
** 参考:** Java工程师面试突击第1季(可能是史上最好的Java面试突击课程)-中华石杉老师!公众号后台回复关键字“1”即可获取该视频内容。
291
287
292
-
293
-
294
288
## 公众号
295
289
296
290
如果大家想要实时关注我更新的文章以及分享的干货的话,可以关注我的公众号。
You can’t perform that action at this time.
0 commit comments