r112192 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112191‎ | r112192 | r112193 >
Date:08:13, 23 February 2012
Author:maxsem
Status:ok
Tags:
Comment:
Tweak cache key
Modified paths:
  • /trunk/extensions/MobileFrontend/ApiQueryExcerpt.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/ApiQueryExcerpt.php
@@ -30,7 +30,8 @@
3131 private function getExcerpt( Title $title, $plainText ) {
3232 global $wgMemc;
3333
34 - $key = wfMemcKey( 'mf', 'excerpt', $title->getPrefixedDBkey(), $title->getArticleID() );
 34+ $wp = WikiPage::factory( $title );
 35+ $key = wfMemcKey( 'mf', 'excerpt', $plainText, $title->getArticleID(), $wp->getLatest() );
3536 $text = $wgMemc->get( $key );
3637 if ( $text !== false ) {
3738 return $text;
@@ -38,7 +39,6 @@
3940 if ( !$this->parserOptions ) {
4041 $this->parserOptions = new ParserOptions( new User( '127.0.0.1' ) );
4142 }
42 - $wp = WikiPage::factory( $title );
4343 $pout = $wp->getParserOutput( $this->parserOptions );
4444 $text = $this->processText( $pout->getText(), $title, $plainText );
4545 $wgMemc->set( $key, $text );

Status & tagging log