3 ms·
Numbers in redis can be natively represented using BITFIELDS. > BITFIELD player:1:stats SET u32 #0 1000 1) (integer) 0 > BITFIELD player:1:stats INCRBY u32 #
by voxic11 4y ago
Numbers in redis can be natively represented using BITFIELDS.
> BITFIELD player:1:stats SET u32 #0 1000
1) (integer) 0
> BITFIELD player:1:stats INCRBY u32 #0 -900
1) (integer) 100
> BITFIELD player:1:stats GET u32 #0
1) (integer) 100
- xnorswap 4y agoOK, that's helpful thank you. That said, all the keys themselves are still strings and therefore you can't have a SET of numbers or bitfields.