Commit 388d88d2 authored by testshenbd's avatar testshenbd

pc

parent ed66e352
......@@ -10,12 +10,7 @@ class SessionRedisModel extends \Redis\Db0\AbstractModel {
protected $_tableName = 'PHPREDIS_SESSION';
/**
* ����key
*
* @param int $id
* @return string
*/
public function calcKey($id) {
return $this->_tableName . self::DELIMITER . $id;
}
......@@ -30,12 +25,8 @@ class SessionRedisModel extends \Redis\Db0\AbstractModel {
return null;
}
/**
* ��������
*
* @param int $id
* @param array $data
*/
public function update($id, $data) {
return $this->set($this->calcKey($id), json_encode($data));
}
......@@ -64,13 +55,18 @@ class SessionRedisModel extends \Redis\Db0\AbstractModel {
public function delSessionKey($key){
//\Our\Log::getInstance()->write($this->calcKey($key));
$key=trim($key);
return $this->getRedis()->delete($this->calcKey($key));
return $this->getRedis()->del($this->calcKey($key));
}
public function delSessionKeyTest($key){
//\Our\Log::getInstance()->write($this->calcKey($key));
$key=trim($key);
return $this->getRedis()->delete($this->calcKey($key));
\Our\Log::getInstance()->write($this->calcKey($key));
$redisObject=$this->getRedis();
$deleteKey=$this->calcKey($key);
$res=$redisObject->del($deleteKey);
var_dump($res);
session_unset();
session_destroy();
exit;
}
public function getSessionKey($key){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment