mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Making cache config used for cache session storage configurable.
This commit is contained in:
parent
f5d81e53fc
commit
49397c74af
1 changed files with 8 additions and 6 deletions
|
@ -628,7 +628,8 @@ class CakeSession {
|
||||||
'session.save_handler' => 'user',
|
'session.save_handler' => 'user',
|
||||||
),
|
),
|
||||||
'handler' => array(
|
'handler' => array(
|
||||||
'engine' => 'CacheSession'
|
'engine' => 'CacheSession',
|
||||||
|
'config' => 'default'
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'database' => array(
|
'database' => array(
|
||||||
|
@ -645,7 +646,8 @@ class CakeSession {
|
||||||
'session.serialize_handler' => 'php',
|
'session.serialize_handler' => 'php',
|
||||||
),
|
),
|
||||||
'handler' => array(
|
'handler' => array(
|
||||||
'engine' => 'DatabaseSession'
|
'engine' => 'DatabaseSession',
|
||||||
|
'model' => 'Session'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -838,7 +840,7 @@ class CacheSession implements CakeSessionHandlerInterface {
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
public static function read($id) {
|
public static function read($id) {
|
||||||
return Cache::read($id);
|
return Cache::read($id, Configure::read('Session.handler.config'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -850,7 +852,7 @@ class CacheSession implements CakeSessionHandlerInterface {
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
public static function write($id, $data) {
|
public static function write($id, $data) {
|
||||||
return Cache::write($id, $data);
|
return Cache::write($id, $data, Configure::read('Session.handler.config'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -861,7 +863,7 @@ class CacheSession implements CakeSessionHandlerInterface {
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
public static function destroy($id) {
|
public static function destroy($id) {
|
||||||
return Cache::delete($id);
|
return Cache::delete($id, Configure::read('Session.handler.config'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -872,7 +874,7 @@ class CacheSession implements CakeSessionHandlerInterface {
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
public static function gc($expires = null) {
|
public static function gc($expires = null) {
|
||||||
return Cache::gc();
|
return Cache::gc(Configure::read('Session.handler.config'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue