+
+// Destroy the cache on extension changes
+function FILTER_CACHE_DESTROY_ON_EXT_CHANGE ($data) {
+ // Remove cache
+ if (EXT_IS_ACTIVE("cache")) {
+ if ($GLOBALS['cache_instance']->loadCacheFile("config")) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile("extensions")) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile("mod_reg")) $GLOBALS['cache_instance']->destroyCacheFile();
+ } // END - if
+
+ // Return it
+ return $data;
+}
+
+// Destroy the cache on changing admin
+function FILTER_CACHE_DESTROY_ON_ADMIN_CHANGE () {
+ // Remove cache
+ if (EXT_IS_ACTIVE("cache")) {
+ if ($GLOBALS['cache_instance']->loadCacheFile("admins")) $GLOBALS['cache_instance']->destroyCacheFile();
+ } // END - if
+}
+
+// Destroy all cache files
+function FILTER_CACHE_DESTROY_ALL () {
+ // Remove cache
+ if (EXT_IS_ACTIVE("cache")) {
+ if ($GLOBALS['cache_instance']->loadCacheFile("admins")) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile("admins_acls")) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile("config")) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile("extensions")) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile("mod_reg")) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile("refdepths")) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile("refsystem")) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile("themes")) $GLOBALS['cache_instance']->destroyCacheFile();
+ } // END - if
+}
+
+// Filter for purging entire admin menu cache
+function FILTER_CACHE_PURGE_ADMIN_MENU () {
+ // Just call the function
+ CACHE_PURGE_ADMIN_MENU();
+}
+