|
MediaWiki
REL1_20
|
A cache class that replicates all writes to multiple child caches. More...


Public Member Functions | |
| __construct ($params) | |
| Constructor. | |
| add ($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) | |
| incr ($key, $value=1) | |
| lock ($key, $timeout=0) | |
| 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, and ObjectCache\newFromParams().
| MultiWriteBagOStuff::add | ( | $ | key, |
| $ | value, | ||
| $ | exptime = 0 |
||
| ) |
| $key | string |
| $value | mixed |
| $exptime | int |
Reimplemented from BagOStuff.
Definition at line 101 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::decr | ( | $ | key, |
| $ | value = 1 |
||
| ) |
| $key | string |
| $value | int |
Reimplemented from BagOStuff.
Definition at line 129 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::delete | ( | $ | key, |
| $ | time = 0 |
||
| ) |
| $key | string |
| $time | int |
Reimplemented from BagOStuff.
Definition at line 91 of file MultiWriteBagOStuff.php.
References doWrite().
| MultiWriteBagOStuff::deleteObjectsExpiringBefore | ( | $ | date, |
| $ | progressCallback = false |
||
| ) |
Delete objects expiring before a certain date.
Succeed if any of the child caches succeed.
| $date | string |
| $progressCallback | bool|callback |
Reimplemented from BagOStuff.
Definition at line 184 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::doWrite | ( | $ | method | ) | [protected] |
| $method | string |
Definition at line 163 of file MultiWriteBagOStuff.php.
Referenced by add(), decr(), delete(), incr(), replace(), set(), and setDebug().
| MultiWriteBagOStuff::get | ( | $ | key | ) |
| $key | string |
Reimplemented from BagOStuff.
Definition at line 66 of file MultiWriteBagOStuff.php.
References $value.
| MultiWriteBagOStuff::incr | ( | $ | key, |
| $ | value = 1 |
||
| ) |
| $key | string |
| $value | int |
Reimplemented from BagOStuff.
Definition at line 120 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::lock | ( | $ | key, |
| $ | timeout = 0 |
||
| ) |
| $key | string |
| $timeout | int |
Reimplemented from BagOStuff.
Definition at line 138 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::replace | ( | $ | key, |
| $ | value, | ||
| $ | exptime = 0 |
||
| ) |
| $key | string |
| $value | mixed |
| $exptime | int |
Reimplemented from BagOStuff.
Definition at line 111 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::set | ( | $ | key, |
| $ | value, | ||
| $ | exptime = 0 |
||
| ) |
| $key | string |
| $value | mixed |
| $exptime | int |
Reimplemented from BagOStuff.
Definition at line 82 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::setDebug | ( | $ | debug | ) |
| $debug | bool |
Reimplemented from BagOStuff.
Definition at line 58 of file MultiWriteBagOStuff.php.
References doWrite().
| MultiWriteBagOStuff::unlock | ( | $ | key | ) |
| $key | string |
Reimplemented from BagOStuff.
Definition at line 151 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::$caches |
Definition at line 32 of file MultiWriteBagOStuff.php.