Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/225013
Change subject: Conversion to WANObjectCache ...................................................................... Conversion to WANObjectCache Bug: T93141 Change-Id: Icf2981d7f690330788d22deb83856e1793ff3c33 --- M includes/CentralAuthUser.php 1 file changed, 4 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/13/225013/1 diff --git a/includes/CentralAuthUser.php b/includes/CentralAuthUser.php old mode 100644 new mode 100755 index 5dd3c64..5219669 --- a/includes/CentralAuthUser.php +++ b/includes/CentralAuthUser.php @@ -323,8 +323,7 @@ */ protected function loadFromCache( $cache = null, $fromMaster = false ) { if ( $cache == null ) { - global $wgMemc; - $cache = $wgMemc->get( $this->getCacheKey() ); + $cache = ObjectCache::getMainWANInstance()->get( $this->getCacheKey() ); $fromMaster = true; } @@ -383,8 +382,6 @@ * Save cachable data to memcached. */ protected function saveToCache() { - global $wgMemc; - // Make sure the data is fresh if ( isset( $this->mGlobalId ) && !$this->mFromMaster ) { $this->resetState(); @@ -392,7 +389,7 @@ $obj = $this->getCacheObject(); wfDebugLog( 'CentralAuthVerbose', "Saving user {$this->mName} to cache." ); - $wgMemc->set( $this->getCacheKey(), $obj, 86400 ); + ObjectCache::getMainWANInstance()->set( $this->getCacheKey(), $obj, 86400 ); } /** @@ -2669,7 +2666,8 @@ wfDebugLog( 'CentralAuthVerbose', "Quick cache invalidation for global user {$this->mName}" ); - $wgMemc->delete( $this->getCacheKey() ); + ObjectCache::getMainWANInstance()->delete( $this->getCacheKey() ); + $wgMemc->delete( $this->getCacheKey() ); // transition b/c } /** -- To view, visit https://gerrit.wikimedia.org/r/225013 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icf2981d7f690330788d22deb83856e1793ff3c33 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits