|
| __construct (int $maxSize) |
|
| add (int $actorId, UserIdentity $actor) |
| Add $actor with $actorId to the cache.
|
|
| clear () |
| Remove everything from the cache.
|
|
| getActor (string $keyType, $keyValue) |
| Get user identity which has $keyType equal to $keyValue.
|
|
| getActorId (string $keyType, $keyValue) |
| Get actor ID of the user which has $keyType equal to $keyValue.
|
|
| remove (UserIdentity $actor) |
| Remove $actor from cache.
|
|
|
| getCachedValue (string $keyType, $keyValue) |
|
| ping (int $actorId) |
| Record the actor with $actorId was recently used.
|
|
|
array[][] | $cache = [ self::KEY_ACTOR_ID => [], self::KEY_USER_NAME => [], self::KEY_USER_ID => [] ] |
| Contains 3 keys, KEY_ACTOR_ID, KEY_USER_ID, and KEY_USER_NAME, each of which has a value of an array of arrays with actor ids and UserIdentity objects, keyed with the corresponding actor id/user id/user name.
|
|
int | $maxSize |
|
Definition at line 36 of file ActorCache.php.
◆ __construct()
MediaWiki\User\ActorCache::__construct |
( |
int |
$maxSize | ) |
|
◆ add()
MediaWiki\User\ActorCache::add |
( |
int |
$actorId, |
|
|
UserIdentity |
$actor |
|
) |
| |
◆ clear()
MediaWiki\User\ActorCache::clear |
( |
| ) |
|
Remove everything from the cache.
- Access: internal
Definition at line 127 of file ActorCache.php.
◆ getActor()
MediaWiki\User\ActorCache::getActor |
( |
string |
$keyType, |
|
|
|
$keyValue |
|
) |
| |
Get user identity which has $keyType equal to $keyValue.
- Parameters
-
string | $keyType | one of self::KEY_* constants. |
string | int | $keyValue | |
- Returns
- UserIdentity|null
Definition at line 70 of file ActorCache.php.
◆ getActorId()
MediaWiki\User\ActorCache::getActorId |
( |
string |
$keyType, |
|
|
|
$keyValue |
|
) |
| |
Get actor ID of the user which has $keyType equal to $keyValue.
- Parameters
-
string | $keyType | one of self::KEY_* constants. |
string | int | $keyValue | |
- Returns
- int|null
Definition at line 80 of file ActorCache.php.
◆ getCachedValue()
MediaWiki\User\ActorCache::getCachedValue |
( |
string |
$keyType, |
|
|
|
$keyValue |
|
) |
| |
|
private |
- Parameters
-
string | $keyType | one of self::KEY_* constants. |
string | int | $keyValue | |
- Returns
- array|null [ 'actor' => UserIdentity, 'actorId' => int ]
Definition at line 136 of file ActorCache.php.
◆ ping()
MediaWiki\User\ActorCache::ping |
( |
int |
$actorId | ) |
|
|
private |
Record the actor with $actorId was recently used.
- Parameters
-
Definition at line 149 of file ActorCache.php.
◆ remove()
◆ $cache
array [][] MediaWiki\User\ActorCache::$cache = [ self::KEY_ACTOR_ID => [], self::KEY_USER_NAME => [], self::KEY_USER_ID => [] ] |
|
private |
Contains 3 keys, KEY_ACTOR_ID, KEY_USER_ID, and KEY_USER_NAME, each of which has a value of an array of arrays with actor ids and UserIdentity objects, keyed with the corresponding actor id/user id/user name.
Definition at line 55 of file ActorCache.php.
◆ $maxSize
int MediaWiki\User\ActorCache::$maxSize |
|
private |
The documentation for this class was generated from the following file: