r58978 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58977‎ | r58978 | r58979 >
Date:22:13, 12 November 2009
Author:btongminh
Status:ok
Tags:
Comment:
(bug 19391) Fix caching for Recent ChangesFeed. Patch by Mormegil.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/ChangesFeed.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ChangesFeed.php
@@ -20,14 +20,14 @@
2121
2222 public function execute( $feed, $rows, $limit=0, $hideminor=false, $lastmod=false, $target='' ) {
2323 global $messageMemc, $wgFeedCacheTimeout;
24 - global $wgSitename, $wgContLanguageCode;
 24+ global $wgSitename, $wgLang;
2525
2626 if ( !FeedUtils::checkFeedOutput( $this->format ) ) {
2727 return;
2828 }
2929
3030 $timekey = wfMemcKey( $this->type, $this->format, 'timestamp' );
31 - $key = wfMemcKey( $this->type, $this->format, $limit, $hideminor, $target );
 31+ $key = wfMemcKey( $this->type, $this->format, $limit, $hideminor, $target, $wgLang->getCode() );
3232
3333 FeedUtils::checkPurge($timekey, $key);
3434
@@ -55,7 +55,7 @@
5656 public function saveToCache( $feed, $timekey, $key ) {
5757 global $messageMemc;
5858 $expire = 3600 * 24; # One day
59 - $messageMemc->set( $key, $feed );
 59+ $messageMemc->set( $key, $feed, $expire );
6060 $messageMemc->set( $timekey, wfTimestamp( TS_MW ), $expire );
6161 }
6262
Index: trunk/phase3/RELEASE-NOTES
@@ -628,6 +628,7 @@
629629 * (bug 21470) MediaWiki:Sp-contributions-explain is now wrapped in a <p> with
630630 id "mw-sp-contributions-explain"
631631 * (bug 19159) Fixed \overleftrightarrow in texvc
 632+* (bug 19391) Fix caching for Recent ChangesFeed.
632633
633634 == API changes in 1.16 ==
634635

Follow-up revisions

RevisionCommit summaryAuthorDate
r64521* (bug 19393) Feeds now format dates in user language rather than content lan...ialex15:46, 2 April 2010

Status & tagging log