Removed actions that should not be in Title::invalidateCache,
specifically the clearing of the InfoAction cache, and added
those actions to their appropriate locations.
Added a new method InfoAction::invalidateCache that clears the
cache for a given title.
Bug: 46816
Change-Id: Ic12c66446c0d71f567dceb5d4630382ff41ad8bf
- HTMLFileCache::clearFileCache( $this );
- // 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;
}
$this->mTitle->flushRestrictions();
}
$this->mTitle->flushRestrictions();
+ InfoAction::invalidateCache( $this->mTitle );
if ( $logAction == 'unprotect' ) {
$logParams = array();
if ( $logAction == 'unprotect' ) {
$logParams = array();
// File cache
HTMLFileCache::clearFileCache( $title );
// File cache
HTMLFileCache::clearFileCache( $title );
+ InfoAction::invalidateCache( $title );
// Messages
if ( $title->getNamespace() == NS_MEDIAWIKI ) {
// Messages
if ( $title->getNamespace() == NS_MEDIAWIKI ) {
// Clear file cache for this page only
HTMLFileCache::clearFileCache( $title );
// Clear file cache for this page only
HTMLFileCache::clearFileCache( $title );
+ InfoAction::invalidateCache( $title );
+ /**
+ * 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 ) {
+ global $wgMemc;
+ // Clear page info.
+ $revision = WikiPage::factory( $title )->getRevision();
+ if ( $revision !== null ) {
+ $memcKey = wfMemcKey( 'infoaction', $title->getPrefixedText(), $revision->getId() );
+ $wgMemc->delete( $memcKey );
+ }
+ }
+
/**
* Shows page information on GET request.
*
/**
* Shows page information on GET request.
*
$updates = $content->getSecondaryDataUpdates( $title, null, false, $parserOutput );
DataUpdate::runUpdates( $updates );
$updates = $content->getSecondaryDataUpdates( $title, null, false, $parserOutput );
DataUpdate::runUpdates( $updates );
+
+ InfoAction::invalidateCache( $title );
+
wfProfileOut( $fname );
}
}
wfProfileOut( $fname );
}
}