|
| __construct (LoggerInterface $logger, IConnectionProvider $dbProvider, LinkBatchFactory $linkBatchFactory) |
| Uses dependency injection since 1.36.
|
|
| doQuery (array $userIds, $options=[], $caller='') |
| Preloads user names for given list of users.
|
|
| getProp ( $userId, $prop) |
| Get a property of a user based on their user ID.
|
|
| getUserName ( $userId, $ip) |
| Get the name of a user or return $ip if the user ID is 0.
|
|
|
| queryNeeded ( $uid, $type, array $options) |
| Check if a cache type is in $options and was not loaded for this user.
|
|
- Since
- 1.20
- Deprecated
- since 1.43, use ActorStore
Definition at line 34 of file UserCache.php.
◆ __construct()
Uses dependency injection since 1.36.
- Parameters
-
LoggerInterface | $logger | |
IConnectionProvider | $dbProvider | |
LinkBatchFactory | $linkBatchFactory | |
Definition at line 63 of file UserCache.php.
◆ doQuery()
MediaWiki\Cache\UserCache::doQuery |
( |
array | $userIds, |
|
|
| $options = [], |
|
|
| $caller = '' ) |
◆ getProp()
MediaWiki\Cache\UserCache::getProp |
( |
| $userId, |
|
|
| $prop ) |
◆ getUserName()
MediaWiki\Cache\UserCache::getUserName |
( |
| $userId, |
|
|
| $ip ) |
◆ queryNeeded()
MediaWiki\Cache\UserCache::queryNeeded |
( |
| $uid, |
|
|
| $type, |
|
|
array | $options ) |
|
protected |
Check if a cache type is in $options and was not loaded for this user.
- Parameters
-
int | $uid | User ID |
string | $type | Cache type |
array | $options | Requested cache types |
- Returns
- bool
Definition at line 178 of file UserCache.php.
Referenced by MediaWiki\Cache\UserCache\doQuery().
◆ singleton()
static MediaWiki\Cache\UserCache::singleton |
( |
| ) |
|
|
static |
◆ $cache
MediaWiki\Cache\UserCache::$cache = [] |
|
protected |
◆ $typesCached
MediaWiki\Cache\UserCache::$typesCached = [] |
|
protected |
The documentation for this class was generated from the following file: