]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/cache_functions.php
Removed comment introduced by Profi-Concept, this comment should fine (in a much...
[mailer.git] / inc / libs / cache_functions.php
index e58854d92599e7eb1a3e850d5e45dff5ab02087b..3e7698878f0bde1c51a7318090d91ec4218f260d 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 10/11/2003 *
- * ===============                              Last change: 10/11/2003 *
+ * Mailer v0.2.1-FINAL                                Start: 10/11/2003 *
+ * ===================                          Last change: 10/11/2003 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : admins_functions.php                             *
  * $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, 2010 by Mailer Developer Team                    *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -47,7 +46,7 @@ function FILTER_CACHE_DESTROY_ON_EXT_CHANGE ($data) {
        if (!isCacheInstanceValid()) return $data;
 
        // Remove cache
-       foreach (array('config','extensions','modules') as $cache) {
+       foreach (array('config','extension','filter','modules') as $cache) {
                if ($GLOBALS['cache_instance']->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!');
 }