Replace a few deprecated function calls
Bug: T215483
Change-Id: I000b58d8bf67d9c1ea0123a7547b986e8ca69f25
* @return string
*/
protected function getCacheKey( WANObjectCache $cache ) {
* @return string
*/
protected function getCacheKey( WANObjectCache $cache ) {
- $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
$lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
return $cache->makeGlobalKey( 'user', 'id', $lbFactory->getLocalDomainID(), $this->mId );
$lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
return $cache->makeGlobalKey( 'user', 'id', $lbFactory->getLocalDomainID(), $this->mId );
* @since 1.25
*/
protected function loadFromCache() {
* @since 1.25
*/
protected function loadFromCache() {
- $cache = ObjectCache::getMainWANInstance();
+ $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
$data = $cache->getWithSetCallback(
$this->getCacheKey( $cache ),
$cache::TTL_HOUR,
$data = $cache->getWithSetCallback(
$this->getCacheKey( $cache ),
$cache::TTL_HOUR,
- $cache = ObjectCache::getMainWANInstance();
+ $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
$key = $this->getCacheKey( $cache );
if ( $mode === 'refresh' ) {
$cache->delete( $key, 1 );
$key = $this->getCacheKey( $cache );
if ( $mode === 'refresh' ) {
$cache->delete( $key, 1 );