(bug 19391) Fix caching for Recent ChangesFeed. Patch by Mormegil.
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Thu, 12 Nov 2009 22:13:20 +0000 (22:13 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Thu, 12 Nov 2009 22:13:20 +0000 (22:13 +0000)
RELEASE-NOTES
includes/ChangesFeed.php

index 68c5adf..6bead24 100644 (file)
@@ -628,6 +628,7 @@ Hopefully we will remove this configuration var soon)
 * (bug 21470) MediaWiki:Sp-contributions-explain is now wrapped in a <p> with
   id "mw-sp-contributions-explain"
 * (bug 19159) Fixed \overleftrightarrow in texvc
+* (bug 19391) Fix caching for Recent ChangesFeed.
 
 == API changes in 1.16 ==
 
index ce49b00..2058868 100644 (file)
@@ -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 );
        }