From 4b9ad6ede0a0b8154bf0815a87323573dcc57796 Mon Sep 17 00:00:00 2001 From: "Ori.livneh" Date: Mon, 29 Feb 2016 19:04:09 +0000 Subject: [PATCH] Revert "Prevent duplicate memcached lookups for user record" This reverts commit 7d67b4d9195346e1. Caused T128246, T128263, T128275. Change-Id: I639ea59e2d42ffbbf700451074174720f2f45cf4 --- includes/user/User.php | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/includes/user/User.php b/includes/user/User.php index c92c06b0b1..74855911dc 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -468,18 +468,12 @@ class User implements IDBAccessObject { } $cache = ObjectCache::getMainWANInstance(); - $key = $this->getCacheKey( $cache ); - - $processCache = ObjectCache::getLocalServerInstance( 'hash' ); - $data = $processCache->get( $key ); - if ( !is_array( $data ) ) { - $data = $cache->get( $key ); - if ( !is_array( $data ) || $data['mVersion'] < self::VERSION ) { - // Object is expired - return false; - } - $processCache->set( $key, $data ); + $data = $cache->get( $this->getCacheKey( $cache ) ); + if ( !is_array( $data ) || $data['mVersion'] < self::VERSION ) { + // Object is expired + return false; } + wfDebug( "User: got user {$this->mId} from cache\n" ); // Restore from cache -- 2.20.1