SETNX is equivalent to SET(key, value, Flags{IfNotExists}) Works similar to https://redis.io/commands/setnx
(key string, value Value)
| 74 | // |
| 75 | // Works similar to https://redis.io/commands/setnx |
| 76 | func (c Client) SETNX(key string, value Value) (ok bool, err error) { |
| 77 | return c.SET(key, value, IfNotExists) |
| 78 | } |
| 79 | |
| 80 | // GETSET gets the value at the key and atomically sets it to a new value. |
| 81 | // |