示例#1
0
 /**
  * Destroy session
  *
  * @param string $sessionId
  * @return boolean
  */
 public function destroy($sessionId)
 {
     if (!$this->_useRedis) {
         return parent::destroy($sessionId);
     }
     Varien_Profiler::start(__METHOD__);
     if ($this->_logLevel >= Zend_Log::DEBUG) {
         $this->_log(sprintf("Destroying ID %s", $sessionId));
     }
     $this->_redis->pipeline();
     if ($this->_dbNum) {
         $this->_redis->select($this->_dbNum);
     }
     $this->_redis->del(self::SESSION_PREFIX . $sessionId);
     $this->_redis->exec();
     Varien_Profiler::stop(__METHOD__);
     return TRUE;
 }
 /**
  * Destroy session
  *
  * @param string $sessionId
  * @return boolean
  */
 public function destroy($sessionId)
 {
     if (!$this->_useRedis) {
         return parent::destroy($sessionId);
     }
     if ($this->_logLevel >= 7) {
         Mage::log(sprintf("%s: Destroying ID %s", $this->_getPid(), $sessionId), Zend_Log::DEBUG, self::LOG_FILE);
     }
     $this->_redis->pipeline();
     if ($this->_dbNum) {
         $this->_redis->select($this->_dbNum);
     }
     $this->_redis->del(self::SESSION_PREFIX . $sessionId);
     $this->_redis->exec();
     return TRUE;
 }