37 if ( $dbkeys === [] ) {
45 static function () use ( $dbw, $namespace, $dbkeys, $fname ) {
46 $services = MediaWikiServices::getInstance();
47 $lbFactory = $services->getDBLoadBalancerFactory();
55 ->where( [
'page_namespace' => $namespace ] )
56 ->andWhere( [
'page_title' => $dbkeys ] )
58 ->caller( $fname )->fetchFieldValues();
65 $services->getMainConfig()->get( MainConfigNames::UpdateRowsPerQuery );
66 $ticket = $lbFactory->getEmptyTransactionTicket( $fname );
67 $idBatches = array_chunk( $ids, $batchSize );
68 foreach ( $idBatches as $idBatch ) {
71 ->set( [
'page_touched' => $now ] )
72 ->where( [
'page_id' => $idBatch ] )
74 ->caller( $fname )->execute();
75 if ( count( $idBatches ) > 1 ) {
76 $lbFactory->commitAndWaitForReplication( $fname, $ticket );
Deferrable Update for closure/callback updates that should use auto-commit mode.
static addUpdate(DeferrableUpdate $update, $stage=self::POSTSEND)
Add an update to the pending update queue for execution at the appropriate time.
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.