MediaWiki master
|
Inherits Stringable.
Public Member Functions | |
__construct (?WebRequest $request, UserIdentity $user, bool $fromPrimary) | |
__toString () | |
Convert to a string, for debugging. | |
getPartialKey () | |
Get the bucket for the cache entry associated with this key. | |
isUser (UserIdentity $user) | |
Determine whether the specified user is the user stored in the key. | |
matchesStored (self $storedKey) | |
Determine whether a new key matches a stored key sufficiently well to allow the stored cache entry to be returned. | |
Definition at line 13 of file BlockCacheKey.php.
MediaWiki\Block\BlockCacheKey::__construct | ( | ?WebRequest | $request, |
UserIdentity | $user, | ||
bool | $fromPrimary ) |
WebRequest | null | $request | |
UserIdentity | $user | |
bool | $fromPrimary |
Definition at line 30 of file BlockCacheKey.php.
References MediaWiki\User\UserIdentity\getId().
MediaWiki\Block\BlockCacheKey::__toString | ( | ) |
MediaWiki\Block\BlockCacheKey::getPartialKey | ( | ) |
Get the bucket for the cache entry associated with this key.
Entries with the same partial key will replace each other in the cache.
Definition at line 83 of file BlockCacheKey.php.
Referenced by MediaWiki\Block\BlockCache\set().
MediaWiki\Block\BlockCacheKey::isUser | ( | UserIdentity | $user | ) |
Determine whether the specified user is the user stored in the key.
This is used for cache invalidation.
If the WeakReference has expired, it is not possible to serve a cache hit for the user, so that is considered to be a mismatch.
UserIdentity | $user |
Definition at line 100 of file BlockCacheKey.php.
MediaWiki\Block\BlockCacheKey::matchesStored | ( | self | $storedKey | ) |
Determine whether a new key matches a stored key sufficiently well to allow the stored cache entry to be returned.
If a WeakReference in either key has expired, that is considered as a mismatch.
BlockCacheKey | $storedKey |
Definition at line 65 of file BlockCacheKey.php.