redis
redis copied to clipboard
Hset return value is not always correct
Reading the code for Hset
, this package is comparing the return value to 1 to determine the bool
return value.
According to the redis docs for HSET
, a return value of 1
indicates a new field
was added to the hash with the value
given, while a return value of 0
means the given field
was already in the hash and it's value
was updated.
So a return of 0
or 1
both should indicate a successful return value, shouldn't it?