From 7e5e63b1d571713f6fa9919b96367dc359dd894b Mon Sep 17 00:00:00 2001 From: Derick Alangi Date: Wed, 17 Apr 2019 12:59:14 +0100 Subject: [PATCH] Remove usage of deprecated cache code from Echo Bug: T221165 Change-Id: Ib7512395b1cc4fd5e13a8d13bd966b1088f34374 --- includes/NotifUser.php | 4 ++-- includes/SeenTime.php | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/includes/NotifUser.php b/includes/NotifUser.php index 1efb0c066..b8a33fe54 100644 --- a/includes/NotifUser.php +++ b/includes/NotifUser.php @@ -609,7 +609,7 @@ class MWEchoNotifUser { */ protected function getMemcKey( $key ) { global $wgEchoCacheVersion; - return wfMemcKey( $key, $this->mUser->getId(), $wgEchoCacheVersion ); + return $this->cache->makeKey( $key, $this->mUser->getId(), $wgEchoCacheVersion ); } /** @@ -625,7 +625,7 @@ class MWEchoNotifUser { if ( !$globalId ) { return false; } - return wfGlobalCacheKey( $key, $globalId, $wgEchoCacheVersion ); + return $this->cache->makeGlobalKey( $key, $globalId, $wgEchoCacheVersion ); } /** diff --git a/includes/SeenTime.php b/includes/SeenTime.php index d008a52bc..79a9f553b 100644 --- a/includes/SeenTime.php +++ b/includes/SeenTime.php @@ -1,5 +1,7 @@ getMainObjectStash() ); } @@ -136,7 +138,9 @@ class EchoSeenTime { * @return string Memcached key */ protected function getMemcKey( $type = 'all' ) { - $localKey = wfMemcKey( 'echo', 'seen', $type, 'time', $this->user->getId() ); + $localKey = self::cache()->makeKey( + 'echo', 'seen', $type, 'time', $this->user->getId() + ); if ( !$this->user->getOption( 'echo-cross-wiki-notifications' ) ) { return $localKey; @@ -149,6 +153,8 @@ class EchoSeenTime { return $localKey; } - return wfGlobalCacheKey( 'echo', 'seen', $type, 'time', $globalId ); + return self::cache()->makeGlobalKey( + 'echo', 'seen', $type, 'time', $globalId + ); } }