Index: branches/5.1.x/core/units/helpers/skin_helper.php =================================================================== diff -u -r13086 -r13168 --- branches/5.1.x/core/units/helpers/skin_helper.php (.../skin_helper.php) (revision 13086) +++ branches/5.1.x/core/units/helpers/skin_helper.php (.../skin_helper.php) (revision 13168) @@ -98,6 +98,9 @@ WHERE ' . $object->IDField . ' = ' . $object->GetID(); $this->Conn->Query($sql); + $this->Application->incrementCacheSerial('skin'); + $this->Application->incrementCacheSerial('skin', $object->GetID()); + return $compile_ts; } @@ -108,16 +111,20 @@ */ function _getStyleInfo() { - static $style = null; + $cache_key = 'primary_skin_info[%SkinSerial%]'; + $ret = $this->Application->getCache($cache_key); - if (!isset($style)) { + if ($ret === false) { + $this->Conn->nextQueryCachable = true; $sql = 'SELECT * FROM ' . TABLE_PREFIX . 'Skins WHERE IsPrimary = 1'; - $style = $this->Conn->GetRow($sql); + $ret = $this->Conn->GetRow($sql); + + $this->Application->setCache($cache_key, $ret); } - return $style; + return $ret; } /**