}
// Next cached table is the module registry (mod_reg)...
-if ($cacheInstance->cache_file("mod_reg", true) == true) {
+if (($cacheInstance->cache_file("mod_reg")) && ($cacheInstance->ext_version_matches("sql_patches"))) {
// Load cache
global $cacheArray;
$cacheArray['modules'] = $cacheInstance->cache_load();
} elseif (($_CONFIG['cache_modreg'] == "Y") && ($CSS != "1") && ($CSS != "-1")) {
// Create cache file here
$cacheInstance->cache_init("MODULES");
+ $cacheInstance->store_extension_version("sql_patches");
// Load all modules and their data
if (GET_EXT_VERSION("sql_patches") >= "0.3.6") {