From 49397c74af075b1f48cefae4dba4cff4e903cd96 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 25 Jul 2010 13:20:30 -0400 Subject: [PATCH] Making cache config used for cache session storage configurable. --- cake/libs/cake_session.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cake/libs/cake_session.php b/cake/libs/cake_session.php index f62734b4a77..ef4f5de1048 100644 --- a/cake/libs/cake_session.php +++ b/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')); } }