- // Do not recreate cache file when it's switched off!
- if (($cacheMode == "init") && ($_CONFIG['cache_exts'] == "N")) $cacheMode = "skip";
+ // Check extension cache
+ switch (($GLOBALS['cache_instance']->loadCacheFile('extensions', true)) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
+ case true : $GLOBALS['cache_mode'] = 'load'; break;
+ case false: $GLOBALS['cache_mode'] = 'init'; break;
+ } // END - switch
+
+ // Do we need to init the cache? But not in "CSS mode".
+ if (($GLOBALS['cache_mode'] == 'init') && (getConfig('cache_exts') == 'Y') && (getOutputMode() == '0')) {
+ // Init cache file
+ $GLOBALS['cache_instance']->init('EXTENSIONS');
+ $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
+ } elseif (getConfig('cache_exts') != 'Y') {
+ // Cache will not be created for extensions
+ $GLOBALS['cache_mode'] = 'skip';
+ }
+} // END - if