r96552 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96551‎ | r96552 | r96553 >
Date:10:53, 8 September 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Committing 2 live hacks swapping cache type (needs reapplying to 1.18wmf1)
Modified paths:
  • /branches/wmf/1.17wmf1/includes/MessageCache.php (modified) (history)
  • /branches/wmf/1.17wmf1/includes/Skin.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/includes/MessageCache.php
@@ -407,7 +407,7 @@
408408 $this->unlock($cacheKey);
409409
410410 // Also delete cached sidebar... just in case it is affected
411 - global $parserMemc;
 411+ global $wgMemc;
412412 $codes = array( $code );
413413 if ( $code === 'en' ) {
414414 // Delete all sidebars, like for example on action=purge on the
@@ -417,7 +417,7 @@
418418
419419 foreach ( $codes as $code ) {
420420 $sidebarKey = wfMemcKey( 'sidebar', $code );
421 - $parserMemc->delete( $sidebarKey );
 421+ $wgMemc->delete( $sidebarKey );
422422 }
423423
424424 // Update the message in the message blob store
Index: branches/wmf/1.17wmf1/includes/Skin.php
@@ -2181,14 +2181,14 @@
21822182 * @return array
21832183 */
21842184 function buildSidebar() {
2185 - global $parserMemc, $wgEnableSidebarCache, $wgSidebarCacheExpiry;
 2185+ global $wgMemc, $wgEnableSidebarCache, $wgSidebarCacheExpiry;
21862186 global $wgLang;
21872187 wfProfileIn( __METHOD__ );
21882188
21892189 $key = wfMemcKey( 'sidebar', $wgLang->getCode() );
21902190
21912191 if ( $wgEnableSidebarCache ) {
2192 - $cachedsidebar = $parserMemc->get( $key );
 2192+ $cachedsidebar = $wgMemc->get( $key );
21932193 if ( $cachedsidebar ) {
21942194 wfProfileOut( __METHOD__ );
21952195 return $cachedsidebar;
@@ -2200,7 +2200,7 @@
22012201
22022202 wfRunHooks( 'SkinBuildSidebar', array( $this, &$bar ) );
22032203 if ( $wgEnableSidebarCache ) {
2204 - $parserMemc->set( $key, $bar, $wgSidebarCacheExpiry );
 2204+ $wgMemc->set( $key, $bar, $wgSidebarCacheExpiry );
22052205 }
22062206
22072207 wfProfileOut( __METHOD__ );

Follow-up revisions

RevisionCommit summaryAuthorDate
r975081.18wmf1, Merge r96552, r96835reedy15:35, 19 September 2011
r114622Remove PrefSwitch/PrefStats...reedy01:16, 30 March 2012

Comments

#Comment by Aaron Schulz (talk | contribs)   20:05, 19 September 2011

Can this go in /trunk?

#Comment by Aaron Schulz (talk | contribs)   20:05, 19 September 2011

Can this go in /trunk?

#Comment by 😂 (talk | contribs)   20:08, 19 September 2011

Probably. I remember asking Sam at the time if we could and we didn't see a reason not to. I think we were just hesitant because there weren't any docs for the change and we wanted to be clear why we were changing it.

#Comment by Aaron Schulz (talk | contribs)   20:11, 19 September 2011

I'd +1 the change.

Status & tagging log