Remove cache use in setNewtalk, as nothing reads from that
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 27 Apr 2015 23:45:58 +0000 (16:45 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 27 Apr 2015 23:45:58 +0000 (16:45 -0700)
Change-Id: Ia094fa99be49816b48e35aeb695b5d9558fd1d28

includes/User.php

index c3d4a65..921d604 100644 (file)
@@ -2252,8 +2252,6 @@ class User implements IDBAccessObject {
         *   page. Ignored if null or !$val.
         */
        public function setNewtalk( $val, $curRev = null ) {
-               global $wgMemc;
-
                if ( wfReadOnly() ) {
                        return;
                }
@@ -2275,12 +2273,6 @@ class User implements IDBAccessObject {
                        $changed = $this->deleteNewtalk( $field, $id );
                }
 
-               if ( $this->isAnon() ) {
-                       // Anons have a separate memcached space, since
-                       // user records aren't kept for them.
-                       $key = wfMemcKey( 'newtalk', 'ip', $id );
-                       $wgMemc->set( $key, $val ? 1 : 0, 1800 );
-               }
                if ( $changed ) {
                        $this->invalidateCache();
                }