Replies: 1 comment 1 reply
-
How do you think @KvrocksLabs/committers ? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background
Kvrocks currently supports TTL(Time to Live) at the key level. In some scenarios, Users need members to support TTL.
#283 also raises this issue. As @git-hulk said in this issue, the implementation is not particularly difficult, but the changes may be quite large because we should add new type and there are so many additional commands to support.
Here are my design and implementation ideas that I would like to discuss with developers. I take
Hash
as an example:Design
ExHash
Hash
Type, we encode expire time in the value of subkey:Hash
,ExHash
has the following special commands:Implement
RedisType
, calledkRedisExHash
InternalKey
class and add member variables about TTL to it. When users obtain corresponding values, they need to check expireSubKeyFilter::IsKeyExpired
, judge whether the Value expireBeta Was this translation helpful? Give feedback.
All reactions