MediaWiki REL1_39
|
Class for fixing stale WANObjectCache keys using a purge event source. More...
Public Member Functions | |
__construct (IDatabase $db, LoggerInterface $logger) | |
doUpdate () | |
Perform the actual work. | |
getEventAffectedKeys (WANObjectCache $cache, LinkTarget $t) | |
Gets a list of important cache keys associated with a title. | |
getTitleChangeEvents ( $start, $id, $end, $limit) | |
Class for fixing stale WANObjectCache keys using a purge event source.
This is useful for expiring keys that missed fire-and-forget purges. This uses the recentchanges table as a reliable stream to make certain keys reach consistency as soon as the underlying replica database catches up. These means that critical keys will not escape getting purged simply due to brief hiccups in the network, which are more prone to happen across datacenters.
"I was trying to cheat death. I was only trying to surmount for a little while the darkness that all my life I surely knew was going to come rolling in on me some day and obliterate me. I was only to stay alive a little brief while longer, after I was already gone. To stay in the light, to be with the living, a little while past my time." -- Notes for "Blues of a Lifetime", by [[Cornell Woolrich]]
Definition at line 26 of file WANCacheReapUpdate.php.
WANCacheReapUpdate::__construct | ( | IDatabase | $db, |
LoggerInterface | $logger ) |
IDatabase | $db | |
LoggerInterface | $logger |
Definition at line 36 of file WANCacheReapUpdate.php.
WANCacheReapUpdate::doUpdate | ( | ) |
Perform the actual work.
Implements DeferrableUpdate.
Definition at line 41 of file WANCacheReapUpdate.php.
WANCacheReapUpdate::getEventAffectedKeys | ( | WANObjectCache | $cache, |
LinkTarget | $t ) |
Gets a list of important cache keys associated with a title.
WANObjectCache | $cache | |
LinkTarget | $t |
Definition at line 105 of file WANCacheReapUpdate.php.
References $cache, $keys, $t, User\newFromName(), NS_FILE, and NS_USER.
WANCacheReapUpdate::getTitleChangeEvents | ( | $start, | |
$id, | |||
$end, | |||
$limit ) |
int | $start | |
int | $id | |
int | $end | |
int | $limit |
Definition at line 65 of file WANCacheReapUpdate.php.
References $res, Wikimedia\Rdbms\Database\DbQuoter\addQuotes(), LIST_OR, Wikimedia\Rdbms\Platform\ISQLPlatform\makeList(), Wikimedia\Rdbms\IDatabase\select(), Wikimedia\Rdbms\Platform\ISQLPlatform\timestamp(), and wfTimestamp().