Method: Redis::Distributed#setnx
- Defined in:
- lib/redis/distributed.rb
#setnx(key, value) ⇒ Object
Set the value of a key, only if the key does not exist.
201 202 203 |
# File 'lib/redis/distributed.rb', line 201 def setnx(key, value) node_for(key).setnx(key, value) end |