Closed Seldaek closed 11 years ago
Alternatively, setting an expiry on the temp keys might be a preferred way to let nature do its work. removeAll would still need a KEYS call, but I don't really expect anyone to do that in prod.
Yes, this is the point I spotted today. Thanks !
And TTL is a good way ! Great ! You're the Redis guy !
How to set a timeout in BITOP ? ping @Seldaek
You can't you have to call EXPIRE on the key after.
Ok great ! I will push it at lunch time !
Pushed !
IMO the keys should be kept in two SETs
bitter:keys
andbitter_temp:keys
. Whenever you write just do a SADD bitter:keys $key. That way removeAll/removeTemp can just be done by looping over all those keys instead of using the KEYS command to find them, because that is slow and on large databases can block the server for a while.