Storing ints using HSET in redis

Viewed 1839

I am using redis to store some numeric values using HSET. Here is an example command I am using

HSET "abc" "field" 123

I'm expecting this to store an integer, but when I do HGETALL, it turns out to be a string:

1) "field"
2) "123"

My two questions are:

  1. Is there any way to store an integer in redis using HSET?
  2. Is there any space saving benefit of doing so?
1 Answers
Related