|
MediaWiki
REL1_24
|
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) | |
| clearLastError () | |
| Clear the "last error" registry. | |
| decr ($key, $value=1) | |
| delete ($key, $time=0) | |
| deleteObjectsExpiringBefore ($date, $progressCallback=false) | |
| Delete objects expiring before a certain date. | |
| get ($key, &$casToken=null) | |
| getLastError () | |
| Get the "last error" registered; clearLastError() should be called manually. | |
| incr ($key, $value=1) | |
| lock ($key, $timeout=0) | |
| merge ($key, Closure $callback, $exptime=0, $attempts=10) | |
| set ($key, $value, $exptime=0) | |
| setDebug ($debug) | |
| unlock ($key) | |
Protected Member Functions | |
| doWrite ($method) | |
Protected Attributes | |
| array | $caches |
| BagOStuff[] *. | |
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:
| array | $params |
| MWException |
Definition at line 44 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::add | ( | $ | key, |
| $ | value, | ||
| $ | exptime = 0 |
||
| ) |
| string | $key | |
| mixed | $value | |
| int | $exptime |
Reimplemented from BagOStuff.
Definition at line 113 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::cas | ( | $ | casToken, |
| $ | key, | ||
| $ | value, | ||
| $ | exptime = 0 |
||
| ) |
| mixed | $casToken | |
| string | $key | |
| mixed | $value | |
| mixed | $exptime |
Reimplemented from BagOStuff.
Definition at line 84 of file MultiWriteBagOStuff.php.
Clear the "last error" registry.
Reimplemented from BagOStuff.
Definition at line 176 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::decr | ( | $ | key, |
| $ | value = 1 |
||
| ) |
| string | $key | |
| int | $value |
Reimplemented from BagOStuff.
Definition at line 131 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::delete | ( | $ | key, |
| $ | time = 0 |
||
| ) |
| string | $key | |
| int | $time |
Reimplemented from BagOStuff.
Definition at line 103 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::deleteObjectsExpiringBefore | ( | $ | date, |
| $ | progressCallback = false |
||
| ) |
Delete objects expiring before a certain date.
Succeed if any of the child caches succeed.
| string | $date | |
| bool | callable | $progressCallback |
Reimplemented from BagOStuff.
Definition at line 207 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::doWrite | ( | $ | method | ) | [protected] |
| MultiWriteBagOStuff::get | ( | $ | key, |
| &$ | casToken = null |
||
| ) |
| string | $key | |
| mixed | $casToken | [optional] |
Reimplemented from BagOStuff.
Definition at line 67 of file MultiWriteBagOStuff.php.
Get the "last error" registered; clearLastError() should be called manually.
Reimplemented from BagOStuff.
Definition at line 172 of file MultiWriteBagOStuff.php.
References BagOStuff\ERR_NONE.
| MultiWriteBagOStuff::incr | ( | $ | key, |
| $ | value = 1 |
||
| ) |
| string | $key | |
| int | $value |
Reimplemented from BagOStuff.
Definition at line 122 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::lock | ( | $ | key, |
| $ | timeout = 0 |
||
| ) |
| string | $key | |
| int | $timeout |
Reimplemented from BagOStuff.
Definition at line 140 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::merge | ( | $ | key, |
| Closure $ | callback, | ||
| $ | exptime = 0, |
||
| $ | attempts = 10 |
||
| ) |
| string | $key | |
| Closure | $callback | 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 168 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::set | ( | $ | key, |
| $ | value, | ||
| $ | exptime = 0 |
||
| ) |
| string | $key | |
| mixed | $value | |
| int | $exptime |
Reimplemented from BagOStuff.
Definition at line 94 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::setDebug | ( | $ | debug | ) |
| bool | $debug |
Reimplemented from BagOStuff.
Definition at line 58 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::unlock | ( | $ | key | ) |
| string | $key |
Reimplemented from BagOStuff.
Definition at line 153 of file MultiWriteBagOStuff.php.
array MultiWriteBagOStuff::$caches [protected] |
BagOStuff[] *.
Definition at line 32 of file MultiWriteBagOStuff.php.