Cache class rewritten to better convention
[mailer.git] / inc / extensions.php
index dd6cfa4..ed6f43c 100644 (file)
@@ -200,9 +200,9 @@ function EXTENSION_REGISTER ($ext_name, $id, $dry_run=false) {
                                if ((EXT_IS_ACTIVE("cache")) || (GET_EXT_VERSION("cache") != "")) {
                                        //* DEBUG: */ echo __LINE__.": DESTROY!<br />\n";
                                        // Remove cache files
-                                       if ($cacheInstance->cache_file("extensions", true)) $cacheInstance->cache_destroy();
-                                       if ($cacheInstance->cache_file("mod_reg")) $cacheInstance->cache_destroy();
-                                       if ($cacheInstance->cache_file("config")) $cacheInstance->cache_destroy();
+                                       if ($cacheInstance->loadCacheFile("extensions", true)) $cacheInstance->destroyCacheFile();
+                                       if ($cacheInstance->loadCacheFile("mod_reg"))          $cacheInstance->destroyCacheFile();
+                                       if ($cacheInstance->loadCacheFile("config"))           $cacheInstance->destroyCacheFile();
                                } // END - if
 
                                // Check for added include files
@@ -337,9 +337,9 @@ function EXTENSION_RUN_SQLS($id, $EXT_LOAD_MODE) {
        if (((EXT_IS_ACTIVE("cache")) || (GET_EXT_VERSION("cache") != "")) && (((SQL_AFFECTEDROWS() == 1)) || ($sqlRan === true) || ($EXT_LOAD_MODE == "activate") || ($EXT_LOAD_MODE == "deactivate"))) {
                //* DEBUG: */ echo __LINE__.": DESTROY!<br />\n";
                // Remove cache files
-               if ($cacheInstance->cache_file("extensions", true)) $cacheInstance->cache_destroy();
-               if ($cacheInstance->cache_file("mod_reg"))    $cacheInstance->cache_destroy();
-               if ($cacheInstance->cache_file("config"))     $cacheInstance->cache_destroy();
+               if ($cacheInstance->loadCacheFile("extensions", true)) $cacheInstance->destroyCacheFile();
+               if ($cacheInstance->loadCacheFile("mod_reg"))    $cacheInstance->destroyCacheFile();
+               if ($cacheInstance->loadCacheFile("config"))     $cacheInstance->destroyCacheFile();
 
                // @TODO This causes the whole (!) menu cache being purged
                CACHE_PURGE_ADMIN_MENU();
@@ -536,9 +536,9 @@ function EXTENSION_UPDATE($file, $ext, $EXT_VER, $dry_run=false)
 
                        // Update cache
                        if (EXT_IS_ACTIVE("cache")) {
-                               if ($cacheInstance->cache_file("extensions", true)) $cacheInstance->cache_destroy();
-                               if ($cacheInstance->cache_file("config")) $cacheInstance->cache_destroy();
-                               if ($cacheInstance->cache_file("mod_reg")) $cacheInstance->cache_destroy();
+                               if ($cacheInstance->loadCacheFile("extensions", true)) $cacheInstance->destroyCacheFile();
+                               if ($cacheInstance->loadCacheFile("config")) $cacheInstance->destroyCacheFile();
+                               if ($cacheInstance->loadCacheFile("mod_reg")) $cacheInstance->destroyCacheFile();
                        } // END - if
 
                        // Remove array