Skip to content
Permalink
Browse files

Making cache config used for cache session storage configurable.

  • Loading branch information...
markstory committed Jul 25, 2010
1 parent f5d81e5 commit 49397c74af075b1f48cefae4dba4cff4e903cd96
Showing with 8 additions and 6 deletions.
  1. +8 −6 cake/libs/cake_session.php
@@ -628,7 +628,8 @@ protected static function _defaultConfig($name) {
'session.save_handler' => 'user',
),
'handler' => array(
'engine' => 'CacheSession'
'engine' => 'CacheSession',
'config' => 'default'
)
),
'database' => array(
@@ -645,7 +646,8 @@ protected static function _defaultConfig($name) {
'session.serialize_handler' => 'php',
),
'handler' => array(
'engine' => 'DatabaseSession'
'engine' => 'DatabaseSession',
'model' => 'Session'
)
)
);
@@ -838,7 +840,7 @@ public static function close() {
* @access private
*/
public static function read($id) {
return Cache::read($id);
return Cache::read($id, Configure::read('Session.handler.config'));
}
/**
@@ -850,7 +852,7 @@ public static function read($id) {
* @access private
*/
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 @@ public static function write($id, $data) {
* @access private
*/
public static function destroy($id) {
return Cache::delete($id);
return Cache::delete($id, Configure::read('Session.handler.config'));
}
/**
@@ -872,7 +874,7 @@ public static function destroy($id) {
* @access private
*/
public static function gc($expires = null) {
return Cache::gc();
return Cache::gc(Configure::read('Session.handler.config'));
}
}

0 comments on commit 49397c7

Please sign in to comment.
You can’t perform that action at this time.