diff --git a/cake/libs/cache.php b/cake/libs/cache.php index 5bdb3d7a0..4616a46d2 100644 --- a/cake/libs/cache.php +++ b/cake/libs/cache.php @@ -549,10 +549,16 @@ class Cache { return array(); } +/** + * Write the session when session data is persisted with cache. + * + * @return void + * @access public + */ function __destruct() { if (Configure::read('Session.save') == 'cache' && function_exists('session_write_close')) { - session_write_close(); - } + session_write_close(); + } } }