MediaWiki fundraising/REL1_35
|
Class for scanning through chronological, log-structured data or change logs and locally purging cache keys related to entities that appear in this data. More...
Public Member Functions | |
__construct (WANObjectCache $cache, BagOStuff $store, callable $logCallback, callable $keyCallback, array $params) | |
getState () | |
invoke ( $n=100) | |
Check and reap stale keys based on a chunk of events. | |
setLogger (LoggerInterface $logger) | |
Protected Attributes | |
WANObjectCache | $cache |
string | $channel |
int | $initialStartWindow |
callable | $keyListCallback |
callable | $logChunkCallback |
LoggerInterface | $logger |
BagOStuff | $store |
Class for scanning through chronological, log-structured data or change logs and locally purging cache keys related to entities that appear in this data.
This is useful for repairing cache when purges are missed by using a reliable stream, such as Kafka or a replicated MySQL table. Purge loss between datacenters is expected to be more common than within them.
Definition at line 37 of file WANObjectCacheReaper.php.
WANObjectCacheReaper::__construct | ( | WANObjectCache | $cache, |
BagOStuff | $store, | ||
callable | $logCallback, | ||
callable | $keyCallback, | ||
array | $params ) |
WANObjectCache | $cache | Cache to reap bad keys from |
BagOStuff | $store | Cache to store positions use for locking |
callable | $logCallback | Callback taking arguments:
|
callable | $keyCallback | Callback taking arguments:
|
array | $params | Additional options:
|
Definition at line 76 of file WANObjectCacheReaper.php.
WANObjectCacheReaper::getState | ( | ) |
Definition at line 194 of file WANObjectCacheReaper.php.
|
final |
Check and reap stale keys based on a chunk of events.
int | $n | Number of events |
Definition at line 108 of file WANObjectCacheReaper.php.
References $initialStartWindow, and $keys.
WANObjectCacheReaper::setLogger | ( | LoggerInterface | $logger | ) |
Definition at line 98 of file WANObjectCacheReaper.php.
References $logger.
|
protected |
Definition at line 39 of file WANObjectCacheReaper.php.
Referenced by __construct().
|
protected |
Definition at line 50 of file WANObjectCacheReaper.php.
|
protected |
Definition at line 52 of file WANObjectCacheReaper.php.
Referenced by invoke().
|
protected |
Definition at line 45 of file WANObjectCacheReaper.php.
|
protected |
Definition at line 43 of file WANObjectCacheReaper.php.
|
protected |
Definition at line 47 of file WANObjectCacheReaper.php.
Referenced by setLogger().
|
protected |
Definition at line 41 of file WANObjectCacheReaper.php.
Referenced by __construct().