X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fcache_functions.php;h=0c342e1257ca8c78736ee2fde8e246c214a52337;hb=5da1cea4d68dfb848ff0969e4d3cd4fa85ef173b;hp=2140aaf316f530010b8ce05728bfb68d10a545a4;hpb=64c8349613addc3da2242c5cd6b99d64e3fb5f8e;p=mailer.git diff --git a/inc/libs/cache_functions.php b/inc/libs/cache_functions.php index 2140aaf316..0c342e1257 100644 --- a/inc/libs/cache_functions.php +++ b/inc/libs/cache_functions.php @@ -1,7 +1,7 @@ loadCacheFile($cache)) $GLOBALS['cache_instance']->removeCacheFile(false); - } // END - foreach - - // Return it - return $data; -} - -// Destroy the cache on changing admin -function FILTER_CACHE_DESTROY_ON_ADMIN_CHANGE ($data) { - // Skip this step if the cache instance is not there - if (!isCacheInstanceValid()) return false; - - // Remove cache - if ($GLOBALS['cache_instance']->loadCacheFile('admins')) $GLOBALS['cache_instance']->removeCacheFile(false); - - // Return the data - return $data; -} - -// Destroy all cache files -function FILTER_CACHE_DESTROY_ALL () { - // Skip this step if the cache instance is not there - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); - if (!isCacheInstanceValid()) return false; - - // Remove cache files - foreach (array('admins','admins_acls','config','extensions','modreg','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(false); - } // END - foreach - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); -} - -// Filter for purging 'filter' cache -function FILTER_CACHE_DESTROY_FILTER () { - // Skip this step if the cache instance is not there - if ((!isCacheInstanceValid()) || (getConfig('update_filter_usage') != 'Y')) return false; - - // Remove cache files - if ($GLOBALS['cache_instance']->loadCacheFile('filter')) $GLOBALS['cache_instance']->removeCacheFile(false); -} - // [EOF] ?>