From: Alexandre Emsenhuber Date: Wed, 26 Dec 2012 19:50:38 +0000 (+0100) Subject: Also delete the page information cache when invalidating cache of a non-existing... X-Git-Tag: 1.31.0-rc.0~21123^2~1 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=b3ff701cba6578ff0994ef3b42efcb1ba4eac9cd;p=lhc%2Fweb%2Fwiklou.git 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 --- 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; }