$mBlockreason, $mBlock, $mEffectiveGroups, $mBlockedGlobally,
$mLocked, $mHideName, $mOptions;
//@}
+
+ static $idCacheByName = array();
/**
* Lightweight constructor for an anonymous user.
return null;
}
- static $cache = array();
-
- if ( isset($cache[$name]) ) {
- return $cache[$name];
+ if ( isset(self::$idCacheByName[$name]) ) {
+ return self::$idCacheByName[$name];
}
$dbr = wfGetDB( DB_SLAVE );
$result = $s->user_id;
}
- $cache[$name] = $result;
+ self::$idCacheByName[$name] = $result;
- if ( count($cache) > 1000 ) {
- $cache = array();
+ if ( count(self::$idCacheByName) > 1000 ) {
+ self::$idCacheByName = array();
}
return $result;