Skip to content

Commit

Permalink
Making cache config used for cache session storage configurable.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jul 28, 2010
1 parent f5d81e5 commit 49397c7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions cake/libs/cake_session.php
Expand Up @@ -628,7 +628,8 @@ protected static function _defaultConfig($name) {
'session.save_handler' => 'user',
),
'handler' => array(
'engine' => 'CacheSession'
'engine' => 'CacheSession',
'config' => 'default'
)
),
'database' => array(
Expand All @@ -645,7 +646,8 @@ protected static function _defaultConfig($name) {
'session.serialize_handler' => 'php',
),
'handler' => array(
'engine' => 'DatabaseSession'
'engine' => 'DatabaseSession',
'model' => 'Session'
)
)
);
Expand Down Expand Up @@ -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'));
}

/**
Expand All @@ -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'));
}

/**
Expand All @@ -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'));
}

/**
Expand All @@ -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'));
}
}

Expand Down

0 comments on commit 49397c7

Please sign in to comment.