Revert "Prevent duplicate memcached lookups for user record"
authorOri.livneh <ori@wikimedia.org>
Mon, 29 Feb 2016 19:04:09 +0000 (19:04 +0000)
committerOri.livneh <ori@wikimedia.org>
Mon, 29 Feb 2016 20:16:46 +0000 (20:16 +0000)
This reverts commit 7d67b4d9195346e1.
Caused T128246, T128263, T128275.

Change-Id: I639ea59e2d42ffbbf700451074174720f2f45cf4

includes/user/User.php

index c92c06b..7485591 100644 (file)
@@ -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