HSETNX
HSETNX key field value
#Example
redis> HSETNX myhash field "Hello"
(integer) 1
redis> HSETNX myhash field "World"
(integer) 0
redis> HGET myhash field
"Hello"
Set the value of a hash field, only if the field does not exist
Comments
HSETNX key field value
redis> HSETNX myhash field "Hello"
(integer) 1
redis> HSETNX myhash field "World"
(integer) 0
redis> HGET myhash field
"Hello"
Set the value of a hash field, only if the field does not exist