source/Redis/Connection.php
public function set($key, $value, $timeout = 0) {
        try {
            $result = ($timeout == 0)
                ? $this->getRedis()->set($key, $value)
                : $this->getRedis()->psetex($key, $timeout, $value);
            if ($result !== false) {
                return $result;
            }
            throw new ImpossibleValueException();
        } catch (RedisException $ex) {
            throw new ConnectException();
        }
    }
public function set($key, $value, $timeout = 0) {
        try {
            $result = ($timeout == 0)
                ? $this->getRedis()->set($key, $value)
                : $this->getRedis()->psetex($key, $timeout, $value);
            if ($result !== false) {
                return $result;
            }
            throw new ImpossibleValueException();
        } catch (RedisException $ex) {
            throw new ConnectException();
        }
    }
public function set ( $ key , $ value , $ timeout = 0 ) { try { $ result = ( $ timeout == 0 ) ? $ this -> getRedis ( ) -> set ( $ key , $ value ) : $ this -> getRedis ( ) -> psetex ( $ key , $ timeout , $ value ) ; if ( $ result !== false ) { return $ result ; } throw new ImpossibleValueException ( ) ; } catch ( RedisException $ ex ) { throw new ConnectException ( ) ; } }
Set key value
@param string $key key
@param mixed $value value
@param int $timeout ttl timeout in milliseconds
@return bool operation result
@throws ConnectException exception on connection to redis instance
Set key value