return $lbConf;
}
- /**
- * @param LBFactory $lbf New LBFactory instance that will be bound to $services
- * @param MediaWikiServices $services
- */
- public static function setCacheUsageCallbacks( LBFactory $lbf, MediaWikiServices $services ) {
- // Account for lag and pending updates by default in cache generator callbacks
- $wCache = $services->getMainWANObjectCache();
- $wCache->setDefaultCacheSetOptionCallbacks(
- function () use ( $lbf ) {
- return $lbf->declareUsageSectionStart();
- },
- function ( $id ) use ( $lbf ) {
- $info = $lbf->declareUsageSectionEnd( $id );
-
- return $info['cacheSetOptions'] ?: [];
- }
- );
- }
-
/**
* Returns the LBFactory class to use and the load balancer configuration.
*