From: Bryan Tong Minh Date: Thu, 12 Nov 2009 22:13:20 +0000 (+0000) Subject: (bug 19391) Fix caching for Recent ChangesFeed. Patch by Mormegil. X-Git-Tag: 1.31.0-rc.0~38835 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22suivi_revisions%22%29%20.%20%22?a=commitdiff_plain;h=7cc194b185c93732cbf2d4982088161594cb7d5a;p=lhc%2Fweb%2Fwiklou.git (bug 19391) Fix caching for Recent ChangesFeed. Patch by Mormegil. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 68c5adf152..6bead24161 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -628,6 +628,7 @@ Hopefully we will remove this configuration var soon) * (bug 21470) MediaWiki:Sp-contributions-explain is now wrapped in a

with id "mw-sp-contributions-explain" * (bug 19159) Fixed \overleftrightarrow in texvc +* (bug 19391) Fix caching for Recent ChangesFeed. == API changes in 1.16 == diff --git a/includes/ChangesFeed.php b/includes/ChangesFeed.php index ce49b005fd..2058868d27 100644 --- a/includes/ChangesFeed.php +++ b/includes/ChangesFeed.php @@ -20,14 +20,14 @@ class ChangesFeed { public function execute( $feed, $rows, $limit=0, $hideminor=false, $lastmod=false, $target='' ) { global $messageMemc, $wgFeedCacheTimeout; - global $wgSitename, $wgContLanguageCode; + global $wgSitename, $wgLang; if ( !FeedUtils::checkFeedOutput( $this->format ) ) { return; } $timekey = wfMemcKey( $this->type, $this->format, 'timestamp' ); - $key = wfMemcKey( $this->type, $this->format, $limit, $hideminor, $target ); + $key = wfMemcKey( $this->type, $this->format, $limit, $hideminor, $target, $wgLang->getCode() ); FeedUtils::checkPurge($timekey, $key); @@ -55,7 +55,7 @@ class ChangesFeed { public function saveToCache( $feed, $timekey, $key ) { global $messageMemc; $expire = 3600 * 24; # One day - $messageMemc->set( $key, $feed ); + $messageMemc->set( $key, $feed, $expire ); $messageMemc->set( $timekey, wfTimestamp( TS_MW ), $expire ); }