},
'SiteLookup' => function( MediaWikiServices $services ) {
- // Use the default SiteStore as the SiteLookup implementation for now
- return $services->getSiteStore();
+ $cacheFile = $services->getMainConfig()->get( 'SitesCacheFile' );
+
+ if ( $cacheFile !== false ) {
+ return new FileBasedSiteLookup( $cacheFile );
+ } else {
+ // Use the default SiteStore as the SiteLookup implementation for now
+ return $services->getSiteStore();
+ }
},
'ConfigFactory' => function( MediaWikiServices $services ) {
$config = $services->getMainConfig();
return new ClassicInterwikiLookup(
$wgContLang,
- ObjectCache::getMainWANInstance(),
+ $services->getMainWANObjectCache(),
$config->get( 'InterwikiExpiry' ),
$config->get( 'InterwikiCache' ),
$config->get( 'InterwikiScopes' ),
'LinkCache' => function( MediaWikiServices $services ) {
return new LinkCache(
$services->getTitleFormatter(),
- ObjectCache::getMainWANInstance()
+ $services->getMainWANObjectCache()
);
},