X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fskins%2FSkin.php;h=6834ca5fad5846bf2af9d885c5f125f1a54680df;hb=b5cddfb27b0d50bd396b1ff92d022b2dec766754;hp=ccb202e65a288adc5bd58f25eb5bd0f3699aa84b;hpb=c5fa9b4e646facc3dc67fa6d9c0e87e65a8cd2b2;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index ccb202e65a..6834ca5fad 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -1391,7 +1391,6 @@ abstract class Skin extends ContextSource { * @return string */ function getNewtalks() { - $newMessagesAlert = ''; $user = $this->getUser(); $newtalks = $user->getNewMessageLinks(); @@ -1485,7 +1484,7 @@ abstract class Skin extends ContextSource { * should fall back to the next notice in its sequence */ private function getCachedNotice( $name ) { - global $wgRenderHashAppend, $parserMemc, $wgContLang; + global $wgRenderHashAppend, $wgContLang; $needParse = false; @@ -1506,9 +1505,10 @@ abstract class Skin extends ContextSource { $notice = $msg->plain(); } + $cache = wfGetCache( CACHE_ANYTHING ); // Use the extra hash appender to let eg SSL variants separately cache. - $key = $parserMemc->makeKey( $name . $wgRenderHashAppend ); - $cachedNotice = $parserMemc->get( $key ); + $key = $cache->makeKey( $name . $wgRenderHashAppend ); + $cachedNotice = $cache->get( $key ); if ( is_array( $cachedNotice ) ) { if ( md5( $notice ) == $cachedNotice['hash'] ) { $notice = $cachedNotice['html']; @@ -1521,7 +1521,7 @@ abstract class Skin extends ContextSource { if ( $needParse ) { $parsed = $this->getOutput()->parse( $notice ); - $parserMemc->set( $key, [ 'html' => $parsed, 'hash' => md5( $notice ) ], 600 ); + $cache->set( $key, [ 'html' => $parsed, 'hash' => md5( $notice ) ], 600 ); $notice = $parsed; }