- // When there is a period (.) in the result this test will fail and so the cache file is
- // damaged/corrupted
- $TEST = "failed";
- if (count($cacheArray['ref_depths']) > 0 ) $TEST = ($CNT / (count($cacheArray['ref_depths'])));
- if ($TEST != bigintval($TEST)) {
- // Cache file is corrupted!
- $cacheInstance->cache_destroy();
- unset($cacheArray['ref_depths']);
- }
-} elseif (($_CONFIG['cache_refdepth'] == "Y") && ($CSS != "1") && ($CSS != "-1")) {
+// Next cached table is the referal system (refdepths)...
+if (($GLOBALS['cache_instance']->loadCacheFile('refdepths')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
+ // Load referal system from cache
+ $GLOBALS['cache_array']['refdepths'] = $GLOBALS['cache_instance']->getArrayFromCache();
+} elseif (getOutputMode() != 1) {