Cache class rewritten to better convention
[mailer.git] / inc / modules / admin / what-config_cache.php
index ddb518f..eade175 100644 (file)
@@ -38,7 +38,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 }
 
 // Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
 
 if (isset($_POST['ok'])) {
        // Cache path has been not changed by default so don't test it again
@@ -51,26 +51,26 @@ if (isset($_POST['ok'])) {
        }
 
        // Delete deactivated cache files
-       if (($_POST['cache_admins'] == "N") && ($cacheInstance->cache_file("admins", true))) {
-               $cacheInstance->cache_destroy();
+       if (($_POST['cache_admins'] == "N") && ($cacheInstance->loadCacheFile("admins"))) {
+               $cacheInstance->destroyCacheFile();
        }
-       if (($_POST['cache_acls'] == "N") && ($cacheInstance->cache_file("acls", true))) {
-               $cacheInstance->cache_destroy();
+       if (($_POST['cache_acls'] == "N") && ($cacheInstance->loadCacheFile("acls"))) {
+               $cacheInstance->destroyCacheFile();
        }
-       if (($_POST['cache_exts'] == "N") && ($cacheInstance->cache_file("extensions", true))) {
-               $cacheInstance->cache_destroy();
+       if (($_POST['cache_exts'] == "N") && ($cacheInstance->loadCacheFile("extensions", true))) {
+               $cacheInstance->destroyCacheFile();
        }
-       if (($_POST['cache_config'] == "N") && ($cacheInstance->cache_file("config", true))) {
-               $cacheInstance->cache_destroy();
+       if (($_POST['cache_config'] == "N") && ($cacheInstance->loadCacheFile("config"))) {
+               $cacheInstance->destroyCacheFile();
        }
-       if (($_POST['cache_modreg'] == "N") && ($cacheInstance->cache_file("modreg", true))) {
-               $cacheInstance->cache_destroy();
+       if (($_POST['cache_modreg'] == "N") && ($cacheInstance->loadCacheFile("modreg"))) {
+               $cacheInstance->destroyCacheFile();
        }
-       if (($_POST['cache_refdepth'] == "N") && ($cacheInstance->cache_file("refdepth", true))) {
-               $cacheInstance->cache_destroy();
+       if (($_POST['cache_refdepth'] == "N") && ($cacheInstance->loadCacheFile("refdepth"))) {
+               $cacheInstance->destroyCacheFile();
        }
-       if (($_POST['cache_refsys'] == "N") && ($cacheInstance->cache_file("refsys", true))) {
-               $cacheInstance->cache_destroy();
+       if (($_POST['cache_refsys'] == "N") && ($cacheInstance->loadCacheFile("refsys"))) {
+               $cacheInstance->destroyCacheFile();
        }
 
        // Save configuration