Re:Redis scripts do not expire keys atomically
by andydunstall on Thursday January 27, 2022 @10:40AM
(#30101830)
we reordered our keys such that they can expire at different times - also redis checks a keys TTL before returning - and wont return if its expired. i think it will 'eventually' delete if its not accessed, but we only cared about keys being returned, not when its actually deleted
Re:Redis scripts do not expire keys atomically
by gorjusborg on Thursday January 27, 2022 @12:59PM
(#30103776)
Thanks for clarifying. I wasn't aware of the fact that redis removes expired keys even if they aren't deleted. I've always thought of expiry as more of a resource management annotation. Interesting way to use it.
I never got the impression that Redis gave guarantees on when expired keys were deleted, just that they would be eventually.
If the issue is that you want a consistent all or nothing, why not just use a single key to make that determination?