HSETNX
Since 1.1.0Hashes
Syntax
HSETNX key field valueSets field in the hash at key only if the field does not exist.
Reply
1if the field was set.0if it existed; nothing changes.
Examples
> HSET u name Ada
(integer) 1
> HSETNX u name x
(integer) 0
> HSETNX u age 36
(integer) 1