From 45ce72f907c6948fa1228066eb3a8119a1737554 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Mon, 6 May 2013 00:52:46 +0000 Subject: [PATCH] Revert "Fixed behavior of Title::invalidateCache." Causes jenkins build failure This reverts commit 3b4c514efa08b0a68885b1a920e48f670cd06e15 Change-Id: Ieeb54f1e7a9cfb5ac02b8a9f49bbe0644a064fa0 --- includes/Title.php | 12 +++++++++++- includes/WikiPage.php | 3 --- includes/actions/InfoAction.php | 15 --------------- includes/job/jobs/RefreshLinksJob.php | 1 - 4 files changed, 11 insertions(+), 20 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index 32f585ea35..70e8cd442f 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -4504,8 +4504,18 @@ class Title { $method ); } ); + HTMLFileCache::clearFileCache( $this ); - return true; + // Clear page info. + $revision = WikiPage::factory( $this )->getRevision(); + if ( $revision !== null ) { + $memcKey = wfMemcKey( 'infoaction', $this->getPrefixedText(), $revision->getId() ); + $success = $wgMemc->delete( $memcKey ); + } else { + $success = true; + } + + return $success; } /** diff --git a/includes/WikiPage.php b/includes/WikiPage.php index 76d0166798..8c00e1b526 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -2437,7 +2437,6 @@ class WikiPage implements Page, IDBAccessObject { } $this->mTitle->flushRestrictions(); - InfoAction::invalidateCache( $this->mTitle ); if ( $logAction == 'unprotect' ) { $logParams = array(); @@ -2908,7 +2907,6 @@ class WikiPage implements Page, IDBAccessObject { // File cache HTMLFileCache::clearFileCache( $title ); - InfoAction::invalidateCache( $title ); // Messages if ( $title->getNamespace() == NS_MEDIAWIKI ) { @@ -2951,7 +2949,6 @@ class WikiPage implements Page, IDBAccessObject { // Clear file cache for this page only HTMLFileCache::clearFileCache( $title ); - InfoAction::invalidateCache( $title ); } /**#@-*/ diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php index 49613e74a8..a8905d82fa 100644 --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@ -55,21 +55,6 @@ class InfoAction extends FormlessAction { return false; } - /** - * Clear the info cache for a given Title. - * - * @since 1.22 - * @param Title $title Title to clear cache for - */ - public static function invalidateCache( Title $title ) { - // Clear page info. - $revision = WikiPage::factory( $title )->getRevision(); - if ( $revision !== null ) { - $memcKey = wfMemcKey( 'infoaction', $this->getPrefixedText(), $revision->getId() ); - $wgMemc->delete( $memcKey ); - } - } - /** * Shows page information on GET request. * diff --git a/includes/job/jobs/RefreshLinksJob.php b/includes/job/jobs/RefreshLinksJob.php index c5f87c57ac..57cad874ff 100644 --- a/includes/job/jobs/RefreshLinksJob.php +++ b/includes/job/jobs/RefreshLinksJob.php @@ -60,7 +60,6 @@ class RefreshLinksJob extends Job { } self::runForTitleInternal( $this->title, $revision, __METHOD__ ); - InfoAction::invalidateCache( $this->title ); return true; } -- 2.20.1