37 if ( $dbkeys === [] ) {
45 static function () use ( $dbw, $namespace, $dbkeys, $fname ) {
46 $services = MediaWikiServices::getInstance();
47 $lbFactory = $services->getDBLoadBalancerFactory();
56 'page_namespace' => $namespace,
57 'page_title' => $dbkeys,
58 'page_touched < ' . $dbw->
addQuotes( $now )
68 $services->getMainConfig()->get( MainConfigNames::UpdateRowsPerQuery );
69 $ticket = $lbFactory->getEmptyTransactionTicket( $fname );
70 $idBatches = array_chunk( $ids, $batchSize );
71 foreach ( $idBatches as $idBatch ) {
74 [
'page_touched' => $now ],
76 'page_id' => $idBatch,
77 'page_touched < ' . $dbw->
addQuotes( $now )
81 if ( count( $idBatches ) > 1 ) {
82 $lbFactory->commitAndWaitForReplication( $fname, $ticket );
Deferrable Update for closure/callback updates that should use auto-commit mode.
A class containing constants representing the names of configuration variables.
static invalidatePages(IDatabase $dbw, $namespace, array $dbkeys)
Invalidate the cache of a list of pages from a single namespace.