News for hackers. Stuff that matters.
Re:Redis scripts do not expire keys atomically by avinassh on Thursday January 27, 2022 @01:01PM (#30103798)
Redis expires can't be ordered, unfortunately. [0]

One hack I can think of is, accessing the keys. If the key is expired, then Redis won't provide it and you could know it is expired.

Another way is to club all of the relative keys in a hash [1]

[0] - https://redis.io/commands/expire#how-redis-expires-keys

[1] - https://redis.io/commands/hset

Re:Redis scripts do not expire keys atomically by andydunstall on Friday January 28, 2022 @04:32AM (#30112529)
yep - as i mentioned in a comment below - we arn't concerned about when the key is actually deleted - only that its not returned when looked up if its TTL is hit

sorry should have been more clear

Re:Redis scripts do not expire keys atomically by avinassh on Monday January 31, 2022 @06:55AM (#30147023)
no need to say sorry! Thanks for responding, and the post was fun to read.