From 237504541e9d97350d40f1df65f431af59863c7f Mon Sep 17 00:00:00 2001 From: phpnut Date: Mon, 30 Apr 2007 09:12:49 +0000 Subject: [PATCH] Making changes to cache classes and rearranging code to use new cache git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4940 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/bootstrap.php | 6 +++--- cake/libs/cache.php | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/cake/bootstrap.php b/cake/bootstrap.php index 4e7a172d3..b12b09aef 100644 --- a/cake/bootstrap.php +++ b/cake/bootstrap.php @@ -45,9 +45,6 @@ if (!defined('PHP5')) { require LIBS . 'inflector.php'; require LIBS . 'configure.php'; $paths = Configure::getInstance(); - Configure::store(null, 'class.paths'); - Configure::load('class.paths'); - Configure::write('debug', DEBUG); if(isset($cakeCache)) { $cache = 'File'; @@ -63,6 +60,9 @@ if (!defined('PHP5')) { } else { Cache::engine(); } + Configure::store(null, 'class.paths'); + Configure::load('class.paths'); + Configure::write('debug', DEBUG); /** * Check for IIS Server */ diff --git a/cake/libs/cache.php b/cake/libs/cache.php index b82a3ec72..4d6d3fa6a 100644 --- a/cake/libs/cache.php +++ b/cake/libs/cache.php @@ -159,10 +159,9 @@ class Cache extends Object { * @param string $key Identifier for the data * @return mixed The cached data, or false if the data doesn't exist, has expired, or if there was an error fetching it */ - function &read($key) { + function read($key) { if(defined('DISABLE_CACHE')) { - $val = false; - return $val; + return false; } $key = strval($key); @@ -175,7 +174,7 @@ class Cache extends Object { if(!isset($_this->_Engine)) { return false; } - return $val; + return $_this->_Engine->read($key); } /** * Delete a value from the cache