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 );
+ } );
}
}