I want to keep a JSON payload into Redis. There may be without a doubt 2 ways I will do that:
1. One using simple string keys and values.
key: user, value: payload (The whole JSON blob which can be 100-200 kb)
SET user:1 payload
2. Using hashes
HSET user:1 username "someone"
HSET user:1 location "NY"
HSET user:1 bio "STRING WITH OVER 100 lines"
Keep in mind that if I use a hash, the price length isn't always predictable. They are now not all short along with the bio instance above.
Subscribe to get latest updates