X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Flibs%2Fcache_functions.php;h=3e7698878f0bde1c51a7318090d91ec4218f260d;hb=c8d76610eb94093d4eed4fcd8a6cb72e74c8f6d8;hp=e58854d92599e7eb1a3e850d5e45dff5ab02087b;hpb=7fabfadce30a7bea7ce3ad1f1e2e7e5e616f2669;p=mailer.git diff --git a/inc/libs/cache_functions.php b/inc/libs/cache_functions.php index e58854d925..3e7698878f 100644 --- a/inc/libs/cache_functions.php +++ b/inc/libs/cache_functions.php @@ -1,7 +1,7 @@ loadCacheFile($cache)) $GLOBALS['cache_instance']->removeCacheFile(); } // END - foreach @@ -61,7 +60,7 @@ function FILTER_CACHE_DESTROY_ON_ADMIN_CHANGE ($data) { if (!isCacheInstanceValid()) return false; // Remove cache - if ($GLOBALS['cache_instance']->loadCacheFile('admins')) $GLOBALS['cache_instance']->removeCacheFile(); + if ($GLOBALS['cache_instance']->loadCacheFile('admin')) $GLOBALS['cache_instance']->removeCacheFile(); // Return the data return $data; @@ -74,9 +73,13 @@ function FILTER_CACHE_DESTROY_ALL () { if (!isCacheInstanceValid()) return false; // Remove cache files - foreach (array('admin','admin_acls','config','extensions','modules','refdepths','refsystem','themes','revision','filter','imprint') as $cache) { - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Trying to remove cache %s.", $cache)); - if ($GLOBALS['cache_instance']->loadCacheFile($cache)) $GLOBALS['cache_instance']->removeCacheFile(); + foreach (array('admin','admin_acls','config','extension','modules','refdepths','refsystem','themes','filter','imprint') as $cache) { + // Is the cache file readable? + // @TODO This should be rewritten not to load the cache file for just checking if it is there for save removal. + if ($GLOBALS['cache_instance']->loadCacheFile($cache)) { + // Remove the cache file + $GLOBALS['cache_instance']->removeCacheFile(); + } // END - if } // END - foreach //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); }