* @ingroup FileAbstraction
*/
+use MediaWiki\MediaWikiServices;
use Wikimedia\Rdbms\DBUnexpectedError;
/**
* @param string $source
* @param bool $watch
* @param bool|string $timestamp
- * @param User $user User object or null to use $wgUser
+ * @param User|null $user User object or null to use $wgUser
* @return bool
* @throws MWException
*/
return false; // no description page
}
- $cache = ObjectCache::getMainWANInstance();
+ $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
return $cache->getWithSetCallback(
$this->repo->getLocalCacheKey(
- 'RemoteFileDescription',
- 'url',
+ 'ForeignFileDescription',
$lang->getCode(),
- $this->getName(),
+ md5( $this->getName() ),
$touched
),
$this->repo->descriptionCacheExpiry ?: $cache::TTL_UNCACHEABLE,