﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-成就梦想-文章分类-分布式存储</title><link>http://www.blogjava.net/iamct/category/48978.html</link><description /><language>zh-cn</language><lastBuildDate>Thu, 31 May 2012 10:05:39 GMT</lastBuildDate><pubDate>Thu, 31 May 2012 10:05:39 GMT</pubDate><ttl>60</ttl><item><title>redis 的6种过期策略</title><link>http://www.blogjava.net/iamct/articles/367015.html</link><dc:creator>iamct</dc:creator><author>iamct</author><pubDate>Thu, 22 Dec 2011 06:50:00 GMT</pubDate><guid>http://www.blogjava.net/iamct/articles/367015.html</guid><wfw:comment>http://www.blogjava.net/iamct/comments/367015.html</wfw:comment><comments>http://www.blogjava.net/iamct/articles/367015.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/iamct/comments/commentRss/367015.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/iamct/services/trackbacks/367015.html</trackback:ping><description><![CDATA[redis 官方提供的 conf <div>https://raw.github.com/antirez/redis/2.2/redis.conf</div>中6中过期策略的具体方式。<br />redis 中的默认的过期策略是volatile-lru 。设置方式 &nbsp;&nbsp; <div>config set maxmemory-policy volatile-lru</div><br /><br />maxmemory-policy 六种方式<div><ol type="1"><li> volatile-lru：只对设置了过期时间的key进行LRU（默认值）<wbr>&nbsp;<wbr></li><li>allkeys-lru&nbsp;<wbr>：&nbsp;<wbr>删除lru算法的key &nbsp;<wbr>&nbsp;<wbr></li><li>volatile-random：随机删除即将过期key &nbsp;<wbr>&nbsp;<wbr></li><li>allkeys-random：随机删除&nbsp; <wbr>&nbsp;<wbr></li><li>volatile-ttl&nbsp;<wbr>：&nbsp;<wbr>删除即将过期的 &nbsp;<wbr>&nbsp;<wbr></li><li> noeviction&nbsp;<wbr>：&nbsp;<wbr>永不过期，返回错误 <wbr>&nbsp;<wbr></li></ol></div><img src ="http://www.blogjava.net/iamct/aggbug/367015.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/iamct/" target="_blank">iamct</a> 2011-12-22 14:50 <a href="http://www.blogjava.net/iamct/articles/367015.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>