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
This commit is contained in:
phpnut 2007-04-30 09:12:49 +00:00
parent b6fb4d80d0
commit 237504541e
2 changed files with 6 additions and 7 deletions

View file

@ -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
*/

View file

@ -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