r93685 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93684‎ | r93685 | r93686 >
Date:23:30, 1 August 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Commmit live hack
Modified paths:
  • /branches/wmf/1.17wmf1/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/includes/GlobalFunctions.php
@@ -2148,7 +2148,7 @@
21492149 }
21502150
21512151 function wfGetCachedNotice( $name ) {
2152 - global $wgOut, $wgRenderHashAppend, $parserMemc;
 2152+ global $wgOut, $wgRenderHashAppend, $wgMemc;
21532153 $fname = 'wfGetCachedNotice';
21542154 wfProfileIn( $fname );
21552155
@@ -2172,7 +2172,7 @@
21732173
21742174 // Use the extra hash appender to let eg SSL variants separately cache.
21752175 $key = wfMemcKey( $name . $wgRenderHashAppend );
2176 - $cachedNotice = $parserMemc->get( $key );
 2176+ $cachedNotice = $wgMemc->get( $key );
21772177 if( is_array( $cachedNotice ) ) {
21782178 if( md5( $notice ) == $cachedNotice['hash'] ) {
21792179 $notice = $cachedNotice['html'];
@@ -2186,7 +2186,7 @@
21872187 if( $needParse ) {
21882188 if( is_object( $wgOut ) ) {
21892189 $parsed = $wgOut->parse( $notice );
2190 - $parserMemc->set( $key, array( 'html' => $parsed, 'hash' => md5( $notice ) ), 600 );
 2190+ $wgMemc->set( $key, array( 'html' => $parsed, 'hash' => md5( $notice ) ), 600 );
21912191 $notice = $parsed;
21922192 } else {
21932193 wfDebug( 'wfGetCachedNotice called for ' . $name . ' with no $wgOut available' . "\n" );

Comments

#Comment by 😂 (talk | contribs)   16:12, 8 August 2011

The commit itself (get it into svn rather than having a live hack) is good, but it was added without any comments. Sam and I don't know what the rationale is, but comments would help--and would help determining whether it should be pushed to trunk.

Status & tagging log