*/
use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\MediaWikiServices;
/**
* A foreign repository with a remote MediaWiki with an API thingy
* @return bool|string
*/
function getThumbUrlFromCache( $name, $width, $height, $params = "" ) {
- $cache = ObjectCache::getMainWANInstance();
+ $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
// We can't check the local cache using FileRepo functions because
// we override fileExistsBatch(). We have to use the FileBackend directly.
$backend = $this->getBackend(); // convenience
$url = $this->makeUrl( $query, 'api' );
}
- $cache = ObjectCache::getMainWANInstance();
+ $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
return $cache->getWithSetCallback(
$this->getLocalCacheKey( static::class, $target, md5( $url ) ),
$cacheTTL,