Change-Id: I1e2d61722a18e4046bdf7c375ea9c1dbbea4a157
* @param FileRepo|bool $repo
*/
function __construct( $title, $repo ) {
- if ( $title !== false ) { // subclasses may not use MW titles
+ // Some subclasses do not use $title, but set name/title some other way
+ if ( $title !== false ) {
$title = self::normalizeTitle( $title, 'exception' );
}
$this->title = $title;
* Purge the file object/metadata cache
*/
function invalidateCache() {
- $this->load();
-
$key = $this->getCacheKey();
if ( !$key ) {
return;
}
- $cache = ObjectCache::getMainWANInstance();
- $cache->delete( $key );
+ ObjectCache::getMainWANInstance()->delete( $key );
}
/**