MediaWiki r30736 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r30735‎ | r30736 (on ViewVC)‎ | r30737 >
Date:09:11, 9 February 2008
Author:tstarling
Status:old
Tags:
Comment:
Configurable expiry time for the sidebar cache
Modified paths:

Diff [purge]

Index: trunk/phase3/includes/DefaultSettings.php
@@ -1013,6 +1013,11 @@
10141014 $wgEnableSidebarCache = false;
10151015
10161016 /**
 1017+ * Expiry time for the sidebar cache, in seconds
 1018+ */
 1019+$wgSidebarCacheExpiry = 86400;
 1020+
 1021+/**
10171022 * Under which condition should a page in the main namespace be counted
10181023 * as a valid article? If $wgUseCommaCount is set to true, it will be
10191024 * counted if it contains at least one comma. If it is set to false
Index: trunk/phase3/includes/Skin.php
@@ -1602,7 +1602,7 @@
16031603 * @private
16041604 */
16051605 function buildSidebar() {
1606 - global $parserMemc, $wgEnableSidebarCache;
 1606+ global $parserMemc, $wgEnableSidebarCache, $wgSidebarCacheExpiry;
16071607 global $wgLang, $wgContLang;
16081608
16091609 $fname = 'SkinTemplate::buildSidebar';
@@ -1663,7 +1663,7 @@
16641664 }
16651665 }
16661666 if ($cacheSidebar)
1667 - $parserMemc->set( $key, $bar, 86400 );
 1667+ $parserMemc->set( $key, $bar, $wgSidebarCacheExpiry );
16681668 wfProfileOut( $fname );
16691669 return $bar;
16701670 }

Status & tagging log

  • 15:24, 12 September 2011 Meno25 (talk | contribs) changed the status of r30736 [removed: ok added: old]