40 parent::__construct(
'htmlCacheUpdate', $title,
$params );
44 $this->removeDuplicates = (
50 $this->params += [
'causeAction' =>
'unknown',
'causeAgent' =>
'unknown' ];
66 "htmlCacheUpdate:{$table}:{$title->getPrefixedText()}"
74 if ( isset( $this->params[
'table'] ) && !isset( $this->params[
'pages'] ) ) {
75 $this->params[
'recursive'] =
true;
79 if ( !empty( $this->params[
'recursive'] ) ) {
83 $extraParams[
'causeAction'] = $this->params[
'causeAction'];
84 $extraParams[
'causeAgent'] = $this->params[
'causeAgent'];
92 [
'params' => $extraParams ]
96 } elseif ( isset( $this->params[
'pages'] ) ) {
102 $t->getArticleID() => [
$t->getNamespace(),
$t->getDBkey() ]
116 $pageIds = array_keys( $pages );
131 $condTimestamp = isset( $this->params[
'rootJobTimestamp'] )
132 ? $this->params[
'rootJobTimestamp']
136 $factory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
137 $ticket = $factory->getEmptyTransactionTicket( __METHOD__ );
141 $factory->commitAndWaitForReplication( __METHOD__, $ticket );
143 $dbw->update(
'page',
144 [
'page_touched' => $dbw->timestamp( $touchTimestamp ) ],
147 "page_touched < " . $dbw->addQuotes( $dbw->timestamp( $condTimestamp ) )
156 [
'page_namespace',
'page_title' ],
159 [
'page_id' => $pageIds,
'page_touched' => $dbw->timestamp( $touchTimestamp ) ],
165 foreach ( $titleArray as $title ) {
167 $urls = array_merge(
$urls, $title->getCdnUrls() );
173 foreach ( $titleArray as $title ) {
180 $info = parent::getDeduplicationInfo();
181 if ( is_array( $info[
'params'] ) ) {
184 if ( isset( $info[
'params'][
'pages'] ) ) {
185 unset( $info[
'namespace'] );
186 unset( $info[
'title'] );
194 if ( !empty( $this->params[
'recursive'] ) ) {
196 } elseif ( isset( $this->params[
'pages'] ) ) {
197 return count( $this->params[
'pages'] );
bool $wgPageLanguageUseDB
Enable page language feature Allows setting page language in database.
$wgUpdateRowsPerJob
Number of rows to update per job.
$wgUseFileCache
This will cache static pages for non-logged-in users to reduce database traffic on public sites.
$wgUpdateRowsPerQuery
Number of rows to update per query.
wfTimestampNow()
Convenience function; returns MediaWiki timestamp for the present time.
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
static partitionBacklinkJob(Job $job, $bSize, $cSize, $opts=[])
Break down $job into approximately ($bSize/$cSize) leaf jobs and a single partition job that covers t...
static purge(array $urlArr)
Purges a list of CDN nodes defined in $wgSquidServers.
Job to purge the cache for all pages that link to or use another page or file.
getDeduplicationInfo()
Subclasses may need to override this to make duplication detection work.
__construct(Title $title, array $params)
static newForBacklinks(Title $title, $table, $params=[])
invalidateTitles(array $pages)
static clearFileCache(Title $title)
Clear the file caches for a page for all actions.
static singleton( $domain=false)
Class to both describe a background job and handle jobs.
array $params
Array of job parameters.
static newRootJobParams( $key)
Get "root job" parameters for a task.
static newFromResult( $res)
Represents a title within MediaWiki.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return true