|
MediaWiki
REL1_19
|
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) | |
| Delete an item. | |
| deleteObjectsExpiringBefore ($date, $progressCallback=false) | |
| Delete objects expiring before a certain date. | |
| get ($key) | |
| Get an item with the given key. | |
| incr ($key, $value=1) | |
| lock ($key, $timeout=0) | |
| replace ($key, $value, $exptime=0) | |
| set ($key, $value, $exptime=0) | |
| Set an item. | |
| 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 8 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::__construct | ( | $ | params | ) |
Constructor.
Parameters are:
| $params | array |
Definition at line 20 of file MultiWriteBagOStuff.php.
References ObjectCache\newFromParams().

| MultiWriteBagOStuff::add | ( | $ | key, |
| $ | value, | ||
| $ | exptime = 0 |
||
| ) |
Reimplemented from BagOStuff.
Definition at line 53 of file MultiWriteBagOStuff.php.
References doWrite().

| MultiWriteBagOStuff::decr | ( | $ | key, |
| $ | value = 1 |
||
| ) |
Reimplemented from BagOStuff.
Definition at line 65 of file MultiWriteBagOStuff.php.
References doWrite().

| MultiWriteBagOStuff::delete | ( | $ | key, |
| $ | time = 0 |
||
| ) |
Delete an item.
| $key | string |
| $time | int Amount of time to delay the operation (mostly memcached-specific) |
Reimplemented from BagOStuff.
Definition at line 49 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.
Reimplemented from BagOStuff.
Definition at line 104 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::doWrite | ( | $ | method | ) | [protected] |
Definition at line 86 of file MultiWriteBagOStuff.php.
Referenced by add(), decr(), delete(), incr(), replace(), set(), and setDebug().

| MultiWriteBagOStuff::get | ( | $ | key | ) |
Get an item with the given key.
Returns false if it does not exist.
| $key | string |
Reimplemented from BagOStuff.
Definition at line 35 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::incr | ( | $ | key, |
| $ | value = 1 |
||
| ) |
| $key | String: Key to increase |
| $value | Integer: Value to add to $key (Default 1) |
Reimplemented from BagOStuff.
Definition at line 61 of file MultiWriteBagOStuff.php.
References doWrite().

| MultiWriteBagOStuff::lock | ( | $ | key, |
| $ | timeout = 0 |
||
| ) |
Reimplemented from BagOStuff.
Definition at line 69 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::replace | ( | $ | key, |
| $ | value, | ||
| $ | exptime = 0 |
||
| ) |
Reimplemented from BagOStuff.
Definition at line 57 of file MultiWriteBagOStuff.php.
References doWrite().

| MultiWriteBagOStuff::set | ( | $ | key, |
| $ | value, | ||
| $ | exptime = 0 |
||
| ) |
Set an item.
| $key | string |
| $value | mixed |
| $exptime | int Either an interval in seconds or a unix timestamp for expiry |
Reimplemented from BagOStuff.
Definition at line 45 of file MultiWriteBagOStuff.php.
References doWrite().

| MultiWriteBagOStuff::setDebug | ( | $ | bool | ) |
| $bool | bool |
Reimplemented from BagOStuff.
Definition at line 31 of file MultiWriteBagOStuff.php.
References doWrite().

| MultiWriteBagOStuff::unlock | ( | $ | key | ) |
Reimplemented from BagOStuff.
Definition at line 78 of file MultiWriteBagOStuff.php.
| MultiWriteBagOStuff::$caches |
Definition at line 9 of file MultiWriteBagOStuff.php.