0

I want to store multiple object of same Key_Value in Redis cache using node js? Append, hset or hmset. Can someone give and example with proper function?

Rohan
  • 45
  • 6

1 Answers1

0

You can use REDIS HASHES instead. You can store the key-value pair in hashes by following:

HSET `UNIQUE_KEY` `key` `value`

eg.

HSET 123_foo id_123 '{"name": "foo", "age": 20}'
potatoxchip
  • 516
  • 1
  • 7
  • 20