mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Adding check to no overwrite cache if it has not been modified
This commit is contained in:
parent
6de52f795f
commit
9e64754005
5 changed files with 8 additions and 1 deletions
|
@ -213,6 +213,12 @@ class App {
|
|||
*/
|
||||
private static $__packages = array();
|
||||
|
||||
/**
|
||||
* Inicates whether the cache should be stored again because of an addition to it
|
||||
*
|
||||
*/
|
||||
private static $_cacheChange = false;
|
||||
|
||||
/**
|
||||
* Used to read information stored path
|
||||
*
|
||||
|
@ -691,6 +697,7 @@ class App {
|
|||
} else {
|
||||
self::$__map[$name] = $file;
|
||||
}
|
||||
self::$_cacheChange = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -897,7 +904,7 @@ class App {
|
|||
* @return void
|
||||
*/
|
||||
public static function shutdown() {
|
||||
if (self::$__cache) {
|
||||
if (self::$__cache && self::$_cacheChange) {
|
||||
Cache::write('file_map', array_filter(self::$__map), '_cake_core_');
|
||||
Cache::write('object_map', self::$__objects, '_cake_core_');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue