![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
redis
xyail66
不忘初心。
展开
-
redis过期策略及配置方式
redis服务器实际使用的过期键删除策略有两种: 定期删除 惰性删除 redis 会将每个设置了过期时间的 key 放入到一个独立的字典中,以后会定时遍历这个字典来删除到期的 key。除了定时遍历之外,它还会使用惰性策略来删除过期的 key,所谓惰性策略就是在客户端访问这个 key 的时候,redis 对 key 的过期时间进行检查,如果过期了就立即删除。定时删除是集中处理,惰性删除是零散处理。 通过配合使用这两种删除策略,服务器可以很好地合理使用cpu时间和避免浪费内存空间之间取得平衡。 1.定期转载 2020-08-05 14:36:50 · 3115 阅读 · 1 评论 -
布隆过滤器详解
在进入正文之前,之前看到的有句话我觉得说得很好: Data structures are nothing different. They are like the bookshelves of your application where you can organize your data. Different data structures will give you different facility and benefits. To properly use the power and acce原创 2020-07-27 21:43:30 · 452 阅读 · 0 评论