mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-07 12:36:25 +00:00
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:
parent
b6fb4d80d0
commit
237504541e
2 changed files with 6 additions and 7 deletions
|
@ -45,9 +45,6 @@ if (!defined('PHP5')) {
|
||||||
require LIBS . 'inflector.php';
|
require LIBS . 'inflector.php';
|
||||||
require LIBS . 'configure.php';
|
require LIBS . 'configure.php';
|
||||||
$paths = Configure::getInstance();
|
$paths = Configure::getInstance();
|
||||||
Configure::store(null, 'class.paths');
|
|
||||||
Configure::load('class.paths');
|
|
||||||
Configure::write('debug', DEBUG);
|
|
||||||
|
|
||||||
if(isset($cakeCache)) {
|
if(isset($cakeCache)) {
|
||||||
$cache = 'File';
|
$cache = 'File';
|
||||||
|
@ -63,6 +60,9 @@ if (!defined('PHP5')) {
|
||||||
} else {
|
} else {
|
||||||
Cache::engine();
|
Cache::engine();
|
||||||
}
|
}
|
||||||
|
Configure::store(null, 'class.paths');
|
||||||
|
Configure::load('class.paths');
|
||||||
|
Configure::write('debug', DEBUG);
|
||||||
/**
|
/**
|
||||||
* Check for IIS Server
|
* Check for IIS Server
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -159,10 +159,9 @@ class Cache extends Object {
|
||||||
* @param string $key Identifier for the data
|
* @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
|
* @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')) {
|
if(defined('DISABLE_CACHE')) {
|
||||||
$val = false;
|
return false;
|
||||||
return $val;
|
|
||||||
}
|
}
|
||||||
$key = strval($key);
|
$key = strval($key);
|
||||||
|
|
||||||
|
@ -175,7 +174,7 @@ class Cache extends Object {
|
||||||
if(!isset($_this->_Engine)) {
|
if(!isset($_this->_Engine)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return $val;
|
return $_this->_Engine->read($key);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Delete a value from the cache
|
* Delete a value from the cache
|
||||||
|
|
Loading…
Add table
Reference in a new issue