36 if ( $dbkeys === [] ) {
41 function () use ( $dbw, $namespace, $dbkeys ) {
42 $services = MediaWikiServices::getInstance();
43 $lbFactory =
$services->getDBLoadBalancerFactory();
52 'page_namespace' => $namespace,
53 'page_title' => $dbkeys,
54 'page_touched < ' . $dbw->
addQuotes( $now )
63 $batchSize =
$services->getMainConfig()->get(
'UpdateRowsPerQuery' );
64 $ticket = $lbFactory->getEmptyTransactionTicket( __METHOD__ );
65 foreach ( array_chunk( $ids, $batchSize ) as $idBatch ) {
68 [
'page_touched' => $now ],
70 'page_id' => $idBatch,
71 'page_touched < ' . $dbw->
addQuotes( $now )
75 $lbFactory->commitAndWaitForReplication( __METHOD__, $ticket );
static invalidatePages(IDatabase $dbw, $namespace, array $dbkeys)
Invalidate the cache of a list of pages from a single namespace.
static configuration should be added through ResourceLoaderGetConfigVars instead can be used to get the real title after the basic globals have been set but before ordinary actions take place or wrap services the preferred way to define a new service is the $wgServiceWiringFiles array $services