loadCacheFile($cache)) { // Yes, then remove it $GLOBALS['cache_instance']->removeCacheFile(); } // END - if } // END - foreach // Return it //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); return $filterData; } // Destroy the cache on changing admin function FILTER_CACHE_DESTROY_ON_ADMIN_CHANGE ($filterData) { // Skip this step if the cache instance is not there //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); if (!isCacheInstanceValid()) { return FALSE; } // END - if // Remove cache if ($GLOBALS['cache_instance']->loadCacheFile('admin')) { $GLOBALS['cache_instance']->removeCacheFile(); } // END - if // Return the data //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); return $filterData; } // Destroy all cache files function FILTER_CACHE_DESTROY_ALL ($filterData) { // Skip this step if the cache instance is not there //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); if (!isCacheInstanceValid()) { return FALSE; } // END - if // Remove cache files foreach (array('admin', 'admin_acls', 'config', 'extension', 'earning', 'filter', 'imprint', 'modules', 'payments', 'points_data', 'refdepths', 'refsystem', 'themes') 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!'); return $filterData; } // Filter for purging 'filter' cache function FILTER_CACHE_DESTROY_FILTER ($filterData) { // Skip this step if the cache instance is not there //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); if ((!isCacheInstanceValid()) || ((isConfigEntrySet('update_filter_usage')) && (getConfig('update_filter_usage') != 'Y'))) { return FALSE; } // END - if // Remove cache files rebuildCache('filter', 'filter'); //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); return $filterData; } // [EOF] ?>