X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fcache_functions.php;h=8896ffdf41a99c08395ae90ee44aca3b40272cdb;hb=0fada672e2066043b76ed5d57f852f451a49a3a3;hp=5181e879224817eb64cdbbdc2fa280d37270778f;hpb=263a089d8a499e0e26d0af9e7aa7639f88b8ca60;p=mailer.git diff --git a/inc/libs/cache_functions.php b/inc/libs/cache_functions.php index 5181e87922..8896ffdf41 100644 --- a/inc/libs/cache_functions.php +++ b/inc/libs/cache_functions.php @@ -14,10 +14,9 @@ * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * + * Copyright (c) 2009 - 2011 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -41,54 +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','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('admins')) $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','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(); - } // 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] ?>