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.



306
307
308
# File 'lib/redis/distributed.rb', line 306

def setnx(key, value)
  node_for(key).setnx(key, value)
end