From: Ori.livneh Date: Mon, 29 Feb 2016 19:04:09 +0000 (+0000) Subject: Revert "Prevent duplicate memcached lookups for user record" X-Git-Tag: 1.31.0-rc.0~7792 X-Git-Url: http://git.cyclocoop.org/%27%20.%20url_absolue%28%24favicon%29%20.%20?a=commitdiff_plain;h=4b9ad6ede0a0b8154bf0815a87323573dcc57796;p=lhc%2Fweb%2Fwiklou.git Revert "Prevent duplicate memcached lookups for user record" This reverts commit 7d67b4d9195346e1. Caused T128246, T128263, T128275. Change-Id: I639ea59e2d42ffbbf700451074174720f2f45cf4 --- 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