|
|
|
|
|
by xnorswap
1409 days ago
|
|
I'm not too familiar with redis and this may well help, so thank you. I see some data-types on the right. It surprises me that redis doesn't have a numeric data type. I understand that at its heart it is just a key-value store and doesn't ever need to do range-based lookup but it still surprises me. One consequence of "everything is a string" I've run into (although probably a sign I'm "doing it wrong"), is serialisation overhead in the client. If redis is expecting strings then it's left to the client to choose an appropriate serialisation which can have either performance or other pitfalls. |
|
> 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