$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;
}
/**
}
$this->mTitle->flushRestrictions();
- InfoAction::invalidateCache( $this->mTitle );
if ( $logAction == 'unprotect' ) {
$logParams = array();
// File cache
HTMLFileCache::clearFileCache( $title );
- InfoAction::invalidateCache( $title );
// Messages
if ( $title->getNamespace() == NS_MEDIAWIKI ) {
// Clear file cache for this page only
HTMLFileCache::clearFileCache( $title );
- InfoAction::invalidateCache( $title );
}
/**#@-*/
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.
*
}
self::runForTitleInternal( $this->title, $revision, __METHOD__ );
- InfoAction::invalidateCache( $this->title );
return true;
}