Change-Id: Ida96a976109f7ceee0003b9d1d487c8cf9b80114
*/
use MediaWiki\Logger\LoggerFactory;
*/
use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\MediaWikiServices;
- $cache = ObjectCache::getLocalClusterInstance();
+ $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
$key = $cache->makeKey(
defined( 'static::CACHE_PREFIX' ) ? static::CACHE_PREFIX : static::class,
$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 );
$value = sprintf( "%08d", static::CACHE_VERSION ) . $tree;
$cache->set( $key, $value, 86400 );
- $cache = ObjectCache::getLocalClusterInstance();
+ $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
$key = $cache->makeKey(
defined( 'static::CACHE_PREFIX' ) ? static::CACHE_PREFIX : static::class,
$key = $cache->makeKey(
defined( 'static::CACHE_PREFIX' ) ? static::CACHE_PREFIX : static::class,
- md5( $text ), $flags );
+ md5( $text ),
+ $flags
+ );
$value = $cache->get( $key );
if ( !$value ) {
$value = $cache->get( $key );
if ( !$value ) {