MediaWiki
REL1_22
|
A cache class that replicates all writes to multiple child caches. More...
Public Member Functions | |
__construct ($params) | |
Constructor. | |
add ($key, $value, $exptime=0) | |
cas ($casToken, $key, $value, $exptime=0) | |
decr ($key, $value=1) | |
delete ($key, $time=0) | |
deleteObjectsExpiringBefore ($date, $progressCallback=false) | |
Delete objects expiring before a certain date. | |
get ($key, &$casToken=null) | |
incr ($key, $value=1) | |
lock ($key, $timeout=0) | |
merge ($key, closure $callback, $exptime=0, $attempts=10) | |
replace ($key, $value, $exptime=0) | |
set ($key, $value, $exptime=0) | |
setDebug ($debug) | |
unlock ($key) | |
Public Attributes | |
$caches | |
Protected Member Functions | |
doWrite ($method) |
A cache class that replicates all writes to multiple child caches.
Reads are implemented by reading from the caches in the order they are given in the configuration until a cache gives a positive result.
Definition at line 31 of file MultiWriteBagOStuff.php.
MultiWriteBagOStuff::__construct | ( | $ | params | ) |
Constructor.
Parameters are:
$params | array |
MWException |
Definition at line 44 of file MultiWriteBagOStuff.php.
References $params, array(), as, and ObjectCache\newFromParams().
MultiWriteBagOStuff::add | ( | $ | key, |
$ | value, | ||
$ | exptime = 0 |
||
) |
MultiWriteBagOStuff::cas | ( | $ | casToken, |
$ | key, | ||
$ | value, | ||
$ | exptime = 0 |
||
) |
$casToken | mixed |
$key | string |
$value | mixed |
$exptime | int |
Reimplemented from BagOStuff.
Definition at line 84 of file MultiWriteBagOStuff.php.
MultiWriteBagOStuff::decr | ( | $ | key, |
$ | value = 1 |
||
) |
MultiWriteBagOStuff::delete | ( | $ | key, |
$ | time = 0 |
||
) |
MultiWriteBagOStuff::deleteObjectsExpiringBefore | ( | $ | date, |
$ | progressCallback = false |
||
) |
MultiWriteBagOStuff::doWrite | ( | $ | method | ) | [protected] |
MultiWriteBagOStuff::get | ( | $ | key, |
&$ | casToken = null |
||
) |
MultiWriteBagOStuff::incr | ( | $ | key, |
$ | value = 1 |
||
) |
MultiWriteBagOStuff::lock | ( | $ | key, |
$ | timeout = 0 |
||
) |
$key | string |
$timeout | int |
Reimplemented from BagOStuff.
Definition at line 150 of file MultiWriteBagOStuff.php.
References $key.
MultiWriteBagOStuff::merge | ( | $ | key, |
closure $ | callback, | ||
$ | exptime = 0 , |
||
$ | attempts = 10 |
||
) |
$key | string | |
$callback | closure Callback method to be executed | |
int | $exptime | Either an interval in seconds or a unix timestamp for expiry |
int | $attempts | The amount of times to attempt a merge in case of failure |
Reimplemented from BagOStuff.
Definition at line 178 of file MultiWriteBagOStuff.php.
MultiWriteBagOStuff::replace | ( | $ | key, |
$ | value, | ||
$ | exptime = 0 |
||
) |
MultiWriteBagOStuff::set | ( | $ | key, |
$ | value, | ||
$ | exptime = 0 |
||
) |
MultiWriteBagOStuff::setDebug | ( | $ | debug | ) |
$debug | bool |
Reimplemented from BagOStuff.
Definition at line 58 of file MultiWriteBagOStuff.php.
MultiWriteBagOStuff::unlock | ( | $ | key | ) |
$key | string |
Reimplemented from BagOStuff.
Definition at line 163 of file MultiWriteBagOStuff.php.
References $key.
MultiWriteBagOStuff::$caches |
Definition at line 32 of file MultiWriteBagOStuff.php.