redisworks icon indicating copy to clipboard operation
redisworks copied to clipboard

setting ttl

Open jinyus opened this issue 6 years ago • 4 comments

Is it possible to specify a ttl when saving to redis?

jinyus avatar Jun 23 '18 07:06 jinyus

@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?

seperman avatar Jul 06 '18 05:07 seperman

I would like root.x.y.z = ('value', ttl=20)

eevleevs avatar Mar 05 '20 10:03 eevleevs

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 avatar May 31 '22 09:05 acidbotmaker

@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)

seperman avatar Jun 01 '22 22:06 seperman

Redisworks 0.4.0 is released and this issue is resolved. https://github.com/seperman/redisworks/#passing-ttl-to-the-keys

seperman avatar Nov 06 '22 05:11 seperman

I just noticed this change. Thanks @seperman I will take a look at it.

acidbotmaker avatar Nov 07 '22 05:11 acidbotmaker