Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持过期机制么? #30

Open
askie opened this issue Sep 29, 2013 · 3 comments
Open

支持过期机制么? #30

askie opened this issue Sep 29, 2013 · 3 comments

Comments

@askie
Copy link

askie commented Sep 29, 2013

没看到相关说明,可否针对key设置ttl,过期后key和value都会自动清理掉?

@shenzhe
Copy link
Collaborator

shenzhe commented Oct 1, 2013

rl系列命令支持过期机制。

有两个配置来完成:
rl:ttl 10 //单位s , 强制设置所有key的过期时间为10ms (作用:淘汰冷数据)
rl:ttlcheck 5 //单位s , 配合上面的设置,如果一个key在 6~10s内被读取到,key的过期自动延期为10s (作用:热数据自动续期)

这两个参数,可跟据系统的具体需求来设置。

@askie
Copy link
Author

askie commented Oct 8, 2013

是否可以像redis一样,针对单个key设置ttl,过期后这个key的持久化数据会自动清理掉。
上面的命令是统一处理的命令,需要能够兼容redis的过期机制。

@dapengbusi
Copy link

leveldb中的冷数据,有定期清理机制吗?譬如redis定时清理过期数据机制,没有的话,leveldb数据是否会膨胀。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants