*/
use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\MediaWikiServices;
/**
* @ingroup Parser
return;
}
- $cache = ObjectCache::getLocalClusterInstance();
+ $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
$key = $cache->makeKey(
defined( 'static::CACHE_PREFIX' ) ? static::CACHE_PREFIX : static::class,
- md5( $text ), $flags );
+ md5( $text ),
+ $flags
+ );
$value = sprintf( "%08d", static::CACHE_VERSION ) . $tree;
$cache->set( $key, $value, 86400 );
return false;
}
- $cache = ObjectCache::getLocalClusterInstance();
+ $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
$key = $cache->makeKey(
defined( 'static::CACHE_PREFIX' ) ? static::CACHE_PREFIX : static::class,
- md5( $text ), $flags );
+ md5( $text ),
+ $flags
+ );
$value = $cache->get( $key );
if ( !$value ) {