*/
use MediaWiki\Linker\LinkTarget;
+use MediaWiki\Storage\RevisionRecord;
use Wikimedia\Assert\Assert;
use Wikimedia\Rdbms\Database;
use Wikimedia\Rdbms\IDatabase;
if ( !$revision ) {
return null;
}
- $content = $revision->getContent( Revision::RAW );
+ $content = $revision->getContent( RevisionRecord::RAW );
if ( !$content ) {
$this->getLogger()->error(
return $titleInfo;
}
+ /** @return array */
protected static function fetchTitleInfo( IDatabase $db, array $pages, $fname = __METHOD__ ) {
$titleInfo = [];
$batch = new LinkBatch;
$cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
$allInfo = $cache->getWithSetCallback(
- $cache->makeGlobalKey( 'resourceloader', 'titleinfo', $db->getDomainID(), $hash ),
+ $cache->makeGlobalKey( 'resourceloader-titleinfo', $db->getDomainID(), $hash ),
$cache::TTL_HOUR,
function ( $curVal, &$ttl, array &$setOpts ) use ( $func, $pageNames, $db, $fname ) {
$setOpts += Database::getCacheSetOptions( $db );
},
[
'checkKeys' => [
- $cache->makeGlobalKey( 'resourceloader', 'titleinfo', $db->getDomainID() ) ]
+ $cache->makeGlobalKey( 'resourceloader-titleinfo', $db->getDomainID() ) ]
]
);
if ( $purge ) {
$cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
- $key = $cache->makeGlobalKey( 'resourceloader', 'titleinfo', $domain );
+ $key = $cache->makeGlobalKey( 'resourceloader-titleinfo', $domain );
$cache->touchCheckKey( $key );
}
}