Rather than call $this->load() unconditionally, get just the ID via
$this->getId(), potentially saving us a database lookup.
Change-Id: Ifa3b96956a1d66d3e877573ff01970758fad8790
* Called implicitly from invalidateCache() and saveSettings().
*/
public function clearSharedCache() {
- $this->load();
- if ( $this->mId ) {
+ $id = $this->getId();
+ if ( $id ) {
$cache = ObjectCache::getMainWANInstance();
-
- $cache->delete( wfMemcKey( 'user', 'id', $this->mId ) );
+ $cache->delete( wfMemcKey( 'user', 'id', $id ) );
}
}