aboutsummaryrefslogtreecommitdiffstats
path: root/includes/filerepo/file/File.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/filerepo/file/File.php')
-rw-r--r--includes/filerepo/file/File.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php
index ee7ee6f90dcd..eca546494255 100644
--- a/includes/filerepo/file/File.php
+++ b/includes/filerepo/file/File.php
@@ -1453,7 +1453,7 @@ abstract class File implements IDBAccessObject {
$title = $this->getTitle();
if ( $title ) {
$title->invalidateCache();
- $title->purgeSquid();
+ MediaWikiServices::getInstance()->getHtmlCacheUpdater()->purge( $title );
}
}
@@ -1469,9 +1469,12 @@ abstract class File implements IDBAccessObject {
// Purge cache of all pages using this file
$title = $this->getTitle();
if ( $title ) {
- DeferredUpdates::addUpdate(
- new HTMLCacheUpdate( $title, 'imagelinks', 'file-purge' )
+ $job = HTMLCacheUpdateJob::newForBacklinks(
+ $title,
+ 'imagelinks',
+ [ 'causeAction' => 'file-purge' ]
);
+ JobQueueGroup::singleton()->lazyPush( $job );
}
}