40 parent::__construct(
'htmlCacheUpdate', $title,
$params );
44 $this->removeDuplicates = (
64 "htmlCacheUpdate:{$table}:{$title->getPrefixedText()}"
72 if ( isset( $this->params[
'table'] ) && !isset( $this->params[
'pages'] ) ) {
73 $this->params[
'recursive'] =
true;
77 if ( !empty( $this->params[
'recursive'] ) ) {
89 } elseif ( isset( $this->params[
'pages'] ) ) {
95 $t->getArticleID() => [
$t->getNamespace(),
$t->getDBkey() ]
109 $pageIds = array_keys( $pages );
124 $condTimestamp = isset( $this->params[
'rootJobTimestamp'] )
125 ? $this->params[
'rootJobTimestamp']
129 $factory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
130 $ticket = $factory->getEmptyTransactionTicket( __METHOD__ );
134 $factory->commitAndWaitForReplication( __METHOD__, $ticket );
136 $dbw->update(
'page',
137 [
'page_touched' => $dbw->timestamp( $touchTimestamp ) ],
140 "page_touched < " . $dbw->addQuotes( $dbw->timestamp( $condTimestamp ) )
148 [
'page_namespace',
'page_title' ],
149 [
'page_id' => $pageIds,
'page_touched' => $dbw->timestamp( $touchTimestamp ) ],
155 foreach ( $titleArray as $title ) {
157 $urls = array_merge(
$urls, $title->getCdnUrls() );
163 foreach ( $titleArray as $title ) {
170 if ( !empty( $this->params[
'recursive'] ) ) {
172 } elseif ( isset( $this->params[
'pages'] ) ) {
173 return count( $this->params[
'pages'] );
$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.
__construct(Title $title, array $params)
static newForBacklinks(Title $title, $table)
invalidateTitles(array $pages)
static clearFileCache(Title $title)
Clear the file caches for a page for all actions.
static singleton( $wiki=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