What do you mean by "update if exists"? The standard Redis SET commands (SET
, MSET
, HSET
, LSET
, etc.) will update (overwrite) an existing key if the key already exists or insert a new key if the key doesn't already exist.
Sounds like you are asking for the default behavior.