-// Next cached table is the referral system (refsystem)...
-if ($cacheInstance->cache_file("refsystem", true) == true) {
- // Load referral system from cache
+// Make cacheInstance global
+global $cacheInstance;
+
+// Next cached table is the referal system (refsystem)...
+if (($cacheInstance->loadCacheFile("refsystem")) && ($cacheInstance->extensionVersionMatches("sql_patches"))) {
+ // Load referal system from cache