]> git.mxchange.org Git - mailer.git/blobdiff - inc/classes/cachesystem.class.php
Introduced some wrapper functions, the extension for cache files is now .cache.php...
[mailer.git] / inc / classes / cachesystem.class.php
index 06fc673a4063c801c6133c34041999246f289f2d..a5ea7261d17157cb62921364226888ab37f7c4fe 100644 (file)
@@ -62,13 +62,16 @@ class CacheSystem {
        var $rebuilt = array();
 
        // File extension
-       var $extension = '.cache';
+       var $extension = '';
        var $status = array();
        var $readable = array();
        var $fullPath = '';
 
        // Constructor
        function CacheSystem () {
+               // Set extension
+               $this->extension = getCacheExtension();
+
                // Construct full path
                $this->fullPath = getPath() . getCachePath();
 
@@ -318,7 +321,7 @@ class CacheSystem {
                $this->resetCacheReadStatus();
 
                // Debug message
-               //* DEBUG: */ logDebugMessage(__METHOD__, __LINE__, sprintf("%s should be removed.", $this->name));
+               //* DEBUG: */ logDebugMessage(__METHOD__, __LINE__, sprintf('%s should be removed.', $this->name));
 
                // Is the cache file not yet rebuilt?
                if ((!isset($this->rebuilt[$this->name])) && ($this->isCacheReadable())) {
@@ -491,10 +494,10 @@ class CacheSystem {
                                // Debug messages
                                if (isset($this->version[$this->name][$ext_name])) {
                                        // Does it match?
-                                       $GLOBALS[__METHOD__][$ext_name] = ((isset($this->version[$this->name][$ext_name])) && ($this->version[$this->name][$ext_name] == $ext_ver));
+                                       $GLOBALS[__METHOD__][$ext_name] = ($this->version[$this->name][$ext_name] == $ext_ver);
                                } elseif ($this->isCacheReadable()) {
                                        // No cache version found
-                                       logDebugMessage(__METHOD__, __LINE__, 'Cache ' . $this->name . ' has missing version entry for extension ' . $ext_name . '! Purging cache...');
+                                       logDebugMessage(__METHOD__, __LINE__, 'Cache ' . $this->name . ' has missing version entry for extension ext-' . $ext_name . '! Purging cache...');
        
                                        // Remove the cache file
                                        $this->removeCacheFile(TRUE);