redisworks
redisworks copied to clipboard
setting ttl
Is it possible to specify a ttl when saving to redis?
@jinyus Currently it doesn't have a method for this purpose. But I'm imaging maybe building something like
ttl = TTL(20)
root.x.y.z = ('value', ttl)
What do you think?
I would like root.x.y.z = ('value', ttl=20)
I think it would increase complication when trying to differentiate between actual value tuple and tuple with ttl.
I'm thinking of something like: root.x.y.z('value', ttl=20)
@acidbotmaker Yeah maybe we can have a special object dedicated to it so it can differentiate between it being tuple and that object. Like:
root.x.y.z = WithTTL('value', ttl=20)
Redisworks 0.4.0 is released and this issue is resolved. https://github.com/seperman/redisworks/#passing-ttl-to-the-keys
I just noticed this change. Thanks @seperman I will take a look at it.