private $mPageLanguage = false;
/** @var string|bool|null The page language code from the database, null if not saved in
- * the database or false if not loaded, yet. */
+ * the database or false if not loaded, yet.
+ */
private $mDbPageLanguage = false;
/** @var TitleValue|null A corresponding TitleValue object */
/**
* Purge all applicable CDN URLs
+ * @deprecated 1.34 Use HtmlCacheUpdater
*/
public function purgeSquid() {
- DeferredUpdates::addUpdate(
- new CdnCacheUpdate( $this->getCdnUrls() ),
- DeferredUpdates::PRESEND
- );
+ MediaWikiServices::getInstance()->getHtmlCacheUpdater()->purge( $this->getCdnUrls() );
}
/**
* on the number of links. Typically called on create and delete.
*/
public function touchLinks() {
- DeferredUpdates::addUpdate( new HTMLCacheUpdate( $this, 'pagelinks', 'page-touch' ) );
+ $jobs = [];
+ $jobs[] = HTMLCacheUpdateJob::newForBacklinks(
+ $this,
+ 'pagelinks',
+ [ 'causeAction' => 'page-touch' ]
+ );
if ( $this->mNamespace == NS_CATEGORY ) {
- DeferredUpdates::addUpdate(
- new HTMLCacheUpdate( $this, 'categorylinks', 'category-touch' )
+ $jobs[] = HTMLCacheUpdateJob::newForBacklinks(
+ $this,
+ 'categorylinks',
+ [ 'causeAction' => 'category-touch' ]
);
}
+
+ JobQueueGroup::singleton()->lazyPush( $jobs );
}
/**