摘要: redis允许对key设置超时时间,实现过期key的自动淘汰。这篇blog分析下,其自适应(adaptive)的淘汰机制。redis每隔100ms定时执行的循环(serverCron function)里有如下语句: 655 /* Expire a few keys per cycle, only if this is a master. 656 * On slaves we wait for DEL operations synthesized by the master 657 * in order to guarantee a strict consisten... 阅读全文
posted @ 2012-05-25 15:56 刘浩de技术博客 阅读(3675) 评论(0) 推荐(0) 编辑