=')) { $sessionId = self::SESSION_PREFIX . $id; $this->_redis->pipeline() ->select($this->_dbNum) ->hMSet($sessionId, array( 'data' => $this->_encodeData($data), 'lock' => 0, // 0 so that next lock attempt will get 1 )) ->hIncrBy($sessionId, 'writes', 1) ->expire($sessionId, min((int)$lifetime, (int)$this->_maxLifetime)) ->exec(); } else { $sessionId = self::SESSION_PREFIX . $id; $redis = $this->_redis; $redis->select($this->_dbNum); $redis->hMSet($sessionId, array( 'data' => $this->_encodeData($data), 'lock' => 0, // 0 so that next lock attempt will get 1 )); $redis->hIncrBy($sessionId, 'writes', 1); $redis->expire($sessionId, min((int)$lifetime, (int)$this->_maxLifetime)); //->exec(); //$redis->exec(); } } public function setName($name) { $this->_name = $name; } }