From b3ff701cba6578ff0994ef3b42efcb1ba4eac9cd Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 26 Dec 2012 20:50:38 +0100 Subject: [PATCH] Also delete the page information cache when invalidating cache of a non-existing page Changed the usage of WikiPage::getRevision() to Title::getLatestRevID(), so that the cache is correctly deleted when the page does not exist and it doesn't need to create an instance of the WikiPage class to get an already-available value. Change-Id: Ied4dedd051759503046d5461c640de3490d29c91 --- includes/Title.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index a20367dcef..f045f74a57 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -4476,11 +4476,8 @@ class Title { HTMLFileCache::clearFileCache( $this ); // Clear page info. - $revision = WikiPage::factory( $this )->getRevision(); - if( $revision !== null ) { - $memcKey = wfMemcKey( 'infoaction', $this->getPrefixedText(), $revision->getId() ); - $success = $success && $wgMemc->delete( $memcKey ); - } + $memcKey = wfMemcKey( 'infoaction', $this->getPrefixedText(), $this->getLatestRevID() ); + $success = $success && $wgMemc->delete( $memcKey ); return $success; } -- 2.20.1