Index: branches/5.1.x/core/kernel/utility/cache.php =================================================================== diff -u -N -r13905 -r13990 --- branches/5.1.x/core/kernel/utility/cache.php (.../cache.php) (revision 13905) +++ branches/5.1.x/core/kernel/utility/cache.php (.../cache.php) (revision 13990) @@ -1,6 +1,6 @@ siteKeyName = 'site_serial:' . crc32(SQL_TYPE . '://' . SQL_USER . ':' . SQL_PASS . '@' . SQL_SERVER . ':' . TABLE_PREFIX); + // get cache handler class to use if (array_key_exists('CacheHandler', $GLOBALS['vars']) && $GLOBALS['vars']['CacheHandler']) { // for advanced users, who want to save one SQL on each page load @@ -239,21 +257,20 @@ */ function _cachePrefix($only_site_key_name = false) { - // don't use SERVER_NAME here, because it may be cron, or command line request also - $site_key = 'site_serial:' . crc32(FULL_PATH); - if ($only_site_key_name) { - return $site_key; + return $this->siteKeyName; } - $site_serial = $this->_handler->get($site_key); + if ( !isset($this->siteKeyValue) ) { + $this->siteKeyValue = $this->_handler->get($this->siteKeyName); - if (!$site_serial) { - $site_serial = 1; - $this->_handler->set($site_key, $site_serial); + if (!$this->siteKeyValue) { + $this->siteKeyValue = 1; + $this->_handler->set($this->siteKeyName, $this->siteKeyValue); + } } - return "$site_key:$site_serial:"; + return "{$this->siteKeyName}:{$this->siteKeyValue}:"; } function setStatistics($name, $found)