3 ms·
It seems the article's implication is that they are relying on redis TTL and expiry to guarantee all keys exists or no keys exist, at all times, for a given key
by gorjusborg 5y ago
It seems the article's implication is that they are relying on redis TTL and expiry to guarantee all keys exists or no keys exist, at all times, for a given key set.
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?
- andydunstall 5y agowe 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
- gorjusborg 5y agoThanks 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.