X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fcache_functions.php;h=8896ffdf41a99c08395ae90ee44aca3b40272cdb;hb=0ee18ff2f17d096211666727d9e47f1528a4d885;hp=40505c6e94399723d0ea51f4a0b3623f0dfcec3f;hpb=c3b4eaf29946349ff058691db2dcb615a5379bb2;p=mailer.git diff --git a/inc/libs/cache_functions.php b/inc/libs/cache_functions.php index 40505c6e94..8896ffdf41 100644 --- a/inc/libs/cache_functions.php +++ b/inc/libs/cache_functions.php @@ -40,58 +40,5 @@ if (!defined('__SECURITY')) { die(); } // END - if -// Destroy the cache on extension changes -function FILTER_CACHE_DESTROY_ON_EXT_CHANGE ($data) { - // Return the data anyway if there is no cache extension - if (!isCacheInstanceValid()) return $data; - - // Remove cache - foreach (array('config','extension','filter','modules') as $cache) { - if ($GLOBALS['cache_instance']->loadCacheFile($cache)) $GLOBALS['cache_instance']->removeCacheFile(); - } // 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('admin')) $GLOBALS['cache_instance']->removeCacheFile(); - - // 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('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!'); -} - -// 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(); -} - // [EOF] ?>