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
===================================================================
--- trunk/phase3/includes/DefaultSettings.php	(revision 30735)
+++ trunk/phase3/includes/DefaultSettings.php	(revision 30736)
@@ -1013,6 +1013,11 @@
 $wgEnableSidebarCache = false;
 
 /**
+ * Expiry time for the sidebar cache, in seconds
+ */
+$wgSidebarCacheExpiry = 86400;
+
+/**
  * Under which condition should a page in the main namespace be counted
  * as a valid article? If $wgUseCommaCount is set to true, it will be
  * counted if it contains at least one comma. If it is set to false
Index: trunk/phase3/includes/Skin.php
===================================================================
--- trunk/phase3/includes/Skin.php	(revision 30735)
+++ trunk/phase3/includes/Skin.php	(revision 30736)
@@ -1602,7 +1602,7 @@
 	 * @private
 	 */
 	function buildSidebar() {
-		global $parserMemc, $wgEnableSidebarCache;
+		global $parserMemc, $wgEnableSidebarCache, $wgSidebarCacheExpiry;
 		global $wgLang, $wgContLang;
 
 		$fname = 'SkinTemplate::buildSidebar';
@@ -1663,7 +1663,7 @@
 			}
 		}
 		if ($cacheSidebar)
-			$parserMemc->set( $key, $bar, 86400 );
+			$parserMemc->set( $key, $bar, $wgSidebarCacheExpiry );
 		wfProfileOut( $fname );
 		return $bar;
 	}

Status & tagging log

  • 15:24, 12 September 2011 Meno25 (Talk | contribs) changed the status of r30736 [removed: ok added: old]
Personal tools
Namespaces
Variants
Views
Actions
Site
Support
Download
Development
Communication
Toolbox