- // Default is not matching
- $matches = false;
-
- // Compare only if installed
- if (isExtensionInstalled($ext_name)) {
- // Get extension version
- $ext_ver = getExtensionVersion($ext_name);
-
- // Debug messages
- if (isset($this->version[$this->name][$ext_name])) {
- // Does it match?
- $matches = ((isset($this->version[$this->name][$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...");
-
- // Remove the cache file
- $this->removeCacheFile(true);
+ // Check cache
+ if (!isset($GLOBALS[__METHOD__][$ext_name])) {
+ // Does never match by default
+ $GLOBALS[__METHOD__][$ext_name] = false;
+
+ // Compare only if installed
+ if (isExtensionInstalled($ext_name)) {
+ // Get extension version
+ $ext_ver = getExtensionVersion($ext_name);
+
+ // 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));
+ } elseif ($this->isCacheReadable()) {
+ // No cache version found
+ logDebugMessage(__METHOD__, __LINE__, 'Cache ' . $this->name . ' has missing version entry for extension ' . $ext_name . '! Purging cache...');
+
+ // Remove the cache file
+ $this->removeCacheFile(true);
+ }
+ } else {
+ // Not installed, does always match
+ $GLOBALS[__METHOD__][$ext_name] = true;