Removed $options from RecentChange::newFromConds
[lhc/web/wiklou.git] / includes / UserRightsProxy.php
index 1b9e4b6..2c7032f 100644 (file)
@@ -278,8 +278,9 @@ class UserRightsProxy {
                        array( 'user_id' => $this->id ),
                        __METHOD__ );
 
-               global $wgMemc;
                $key = wfForeignMemcKey( $this->database, false, 'user', 'id', $this->id );
-               $wgMemc->delete( $key );
+               $this->db->onTransactionPreCommitOrIdle( function() use ( $key ) {
+                       ObjectCache::getMainWANInstance()->delete( $key );
+               } );
        }
 }