source/Redis/Connection.php
public function setnx($key, $value) {
        try {
            return $this->getRedis()->setnx($key, $value);
        } catch (RedisException $ex) {
            throw new ConnectException();
        }
    }
public function setnx($key, $value) {
        try {
            return $this->getRedis()->setnx($key, $value);
        } catch (RedisException $ex) {
            throw new ConnectException();
        }
    }
public function setnx ( $ key , $ value ) { try { return $ this -> getRedis ( ) -> setnx ( $ key , $ value ) ; } catch ( RedisException $ ex ) { throw new ConnectException ( ) ; } }
Set key value if not exists
@param string $key key
@param mixed $value value
@return bool returns true, if operation complete succesfull, else false
@throws ConnectException exception on connection to redis instance
Set key value if not exists