From c1fdc0b9223184b1c5879b446abbd79608b33a52 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sat, 9 Feb 2008 09:11:45 +0000 Subject: [PATCH] Configurable expiry time for the sidebar cache --- includes/DefaultSettings.php | 5 +++++ includes/Skin.php | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 446b439f9a..1fa5c7584f 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1012,6 +1012,11 @@ $wgEnableParserCache = true; */ $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 diff --git a/includes/Skin.php b/includes/Skin.php index bb222478fd..30d2c2bcfe 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1602,7 +1602,7 @@ END; * @private */ function buildSidebar() { - global $parserMemc, $wgEnableSidebarCache; + global $parserMemc, $wgEnableSidebarCache, $wgSidebarCacheExpiry; global $wgLang, $wgContLang; $fname = 'SkinTemplate::buildSidebar'; @@ -1663,7 +1663,7 @@ END; } } if ($cacheSidebar) - $parserMemc->set( $key, $bar, 86400 ); + $parserMemc->set( $key, $bar, $wgSidebarCacheExpiry ); wfProfileOut( $fname ); return $bar; } -- 2.20.1