MediaWiki master
MediaWiki\Block\BlockCache Class Reference

Public Member Functions

 clearUser (UserIdentity $user)
 Clear all block cache entries associated with a user.
 
 get (BlockCacheKey $key)
 Get a cached Block for the given key, or null if there is no cache entry, or false if there is a cache entry indicating that the given target is not blocked.
 
 set (BlockCacheKey $key, $value)
 Set a block cache entry.
 

Detailed Description

Access: internal
For use by BlockManager

Definition at line 10 of file BlockCache.php.

Member Function Documentation

◆ clearUser()

MediaWiki\Block\BlockCache::clearUser ( UserIdentity $user)

Clear all block cache entries associated with a user.

Parameters
UserIdentity$user

Definition at line 46 of file BlockCache.php.

◆ get()

MediaWiki\Block\BlockCache::get ( BlockCacheKey $key)

Get a cached Block for the given key, or null if there is no cache entry, or false if there is a cache entry indicating that the given target is not blocked.

Parameters
BlockCacheKey$key
Returns
AbstractBlock|false|null

Definition at line 22 of file BlockCache.php.

◆ set()

MediaWiki\Block\BlockCache::set ( BlockCacheKey $key,
$value )

Set a block cache entry.

Parameters
BlockCacheKey$keyThe bundled block cache parameters
AbstractBlock | false$valueThe block, or false to indicate that the target is not blocked.

Definition at line 37 of file BlockCache.php.

References MediaWiki\Block\BlockCacheKey\getPartialKey().


The documentation for this class was generated from the following file: