// quick due to the small number of entries.
$totalcnt = $rescnt;
$category = $this->cat;
- wfGetDB( DB_MASTER )->onTransactionIdle( function () use ( $category ) {
+ DeferredUpdates::addCallableUpdate( function () use ( $category ) {
$category->refreshCounts();
} );
} else {