3 ms·
> Hence, it is recommended to use HASH data structure and also, RedisJSON module. There's a catch. HASH data structure saves everything as STRING. Your {"count
by est 5y ago
> Hence, it is recommended to use HASH data structure and also, RedisJSON module.
There's a catch. HASH data structure saves everything as STRING. Your {"count": 1} would turn into {"count": "1"}
> Hence, it is recommended to use a SORTED SET
SORTED SET will eventually leads to "Large databases running on a single shard"
- nickphx 5y agoEh, I use hincrby and hincrbyfloat to increment an integer in a hash..
- reconditerose 5y agoI think the point was that you lose the type information provided by JSON when you store the data in a hash. There is no way to tell the difference between a string "1" and an integer 1 when stored as values in a Redis Hash, since the integer will be converted to a string.