3 ms·
Nowadays one can use GETBIT[1] and SETBIT[2] to do it efficiently. [1] http://redis.io/commands/getbit http://redis.io/commands/getbit [2] http://redis.io/comm
by slig 15y ago
Nowadays one can use GETBIT[1] and SETBIT[2] to do it efficiently.
[1] http://redis.io/commands/getbit http://redis.io/commands/getbit
[2] http://redis.io/commands/setbit http://redis.io/commands/setbit
- MichaelGG 15y agoExcept the point in this case was to use Redis's built-in TTL system, which won't work if it's a single key.