// Delete thumbnails and refresh file metadata cache
$this->purgeCache();
$this->purgeDescription();
-
// 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 );
}
}
* Get the URL of the image description page. May return false if it is
* unknown or not applicable.
*
- * @return string
+ * @return string|bool
*/
function getDescriptionUrl() {
if ( $this->repo ) {