|
@@ -11,7 +11,7 @@ class session
|
|
|
static $stInstance = NULL;
|
|
|
private $fdestroy = false;
|
|
|
|
|
|
- const sid_expire = 10000;
|
|
|
+ const sid_expire = 3;
|
|
|
const prefix = 'PHPSESSID';
|
|
|
const session_name = 'PHPSESSID';
|
|
|
|
|
@@ -74,7 +74,6 @@ class session
|
|
|
public function onRead($rsid)
|
|
|
{
|
|
|
//Log::record("onRead sid={$rsid}",Log::DEBUG);
|
|
|
-
|
|
|
$sid = $_COOKIE[self::session_name];
|
|
|
if(empty($sid) || $sid != $rsid)
|
|
|
{
|
|
@@ -104,7 +103,6 @@ class session
|
|
|
}
|
|
|
|
|
|
public function onClose() {
|
|
|
-// Log::record("onClose",Log::DEBUG);
|
|
|
return true;
|
|
|
}
|
|
|
|
|
@@ -112,19 +110,17 @@ class session
|
|
|
if($this->fdestroy) {
|
|
|
dcache($sid,self::prefix);
|
|
|
} else {
|
|
|
- $ret = wcache($sid,array(self::session_name => $data),self::prefix,self::sid_expire);
|
|
|
+ wcache($sid,array(self::session_name => $data),self::prefix,self::sid_expire);
|
|
|
}
|
|
|
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
public function onDestroy($sid) {
|
|
|
-// Log::record("onDestroy sid={$sid}",Log::DEBUG);
|
|
|
return dcache($sid,self::prefix);
|
|
|
}
|
|
|
|
|
|
public function onGc($expire) {
|
|
|
-// Log::record("onGc expire={$expire}",Log::DEBUG);
|
|
|
return true;
|
|
|
}
|
|
|
}
|