MediaWiki
1.23.2
|
A cache class that replicates all writes to multiple child caches. More...
Public Member Functions | |
__construct ( $params) | |
Constructor. More... | |
add ( $key, $value, $exptime=0) | |
cas ( $casToken, $key, $value, $exptime=0) | |
clearLastError () | |
Clear the "last error" registry. More... | |
decr ( $key, $value=1) | |
delete ( $key, $time=0) | |
deleteObjectsExpiringBefore ( $date, $progressCallback=false) | |
Delete objects expiring before a certain date. More... | |
get ( $key, &$casToken=null) | |
getLastError () | |
Get the "last error" registered; clearLastError() should be called manually. More... | |
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 Member Functions inherited from BagOStuff | |
debug ( $text) | |
getMulti (array $keys) | |
Get an associative array containing the item for each of the keys that have items. More... | |
Public Attributes | |
$caches | |
Public Attributes inherited from BagOStuff | |
const | ERR_NO_RESPONSE = 1 |
const | ERR_NONE = 0 |
Possible values for getLastError() More... | |
const | ERR_UNEXPECTED = 3 |
const | ERR_UNREACHABLE = 2 |
Protected Member Functions | |
doWrite ( $method) | |
Protected Member Functions inherited from BagOStuff | |
convertExpiry ( $exptime) | |
Convert an optionally relative time to an absolute time. More... | |
convertToRelative ( $exptime) | |
Convert an optionally absolute expiry time to a relative time. More... | |
isInteger ( $value) | |
Check if a value is an integer. More... | |
mergeViaCas ( $key, closure $callback, $exptime=0, $attempts=10) | |
mergeViaLock ( $key, closure $callback, $exptime=0, $attempts=10) | |
setLastError ( $err) | |
Set the "last error" registry. More... | |
Additional Inherited Members | |
Protected Attributes inherited from BagOStuff | |
$lastError = self::ERR_NONE | |
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 |
|||
) |
$key | string |
$value | mixed |
$exptime | int |
Reimplemented from BagOStuff.
Definition at line 113 of file MultiWriteBagOStuff.php.
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::clearLastError | ( | ) |
Clear the "last error" registry.
Reimplemented from BagOStuff.
Definition at line 186 of file MultiWriteBagOStuff.php.
MultiWriteBagOStuff::decr | ( | $key, | |
$value = 1 |
|||
) |
$key | string |
$value | int |
Reimplemented from BagOStuff.
Definition at line 141 of file MultiWriteBagOStuff.php.
MultiWriteBagOStuff::delete | ( | $key, | |
$time = 0 |
|||
) |
$key | string |
$time | int |
Reimplemented from BagOStuff.
Definition at line 103 of file MultiWriteBagOStuff.php.
MultiWriteBagOStuff::deleteObjectsExpiringBefore | ( | $date, | |
$progressCallback = false |
|||
) |
|
protected |
MultiWriteBagOStuff::get | ( | $key, | |
& | $casToken = null |
||
) |
MultiWriteBagOStuff::getLastError | ( | ) |
Get the "last error" registered; clearLastError() should be called manually.
Reimplemented from BagOStuff.
Definition at line 182 of file MultiWriteBagOStuff.php.
References BagOStuff\ERR_NONE.
MultiWriteBagOStuff::incr | ( | $key, | |
$value = 1 |
|||
) |
$key | string |
$value | int |
Reimplemented from BagOStuff.
Definition at line 132 of file MultiWriteBagOStuff.php.
MultiWriteBagOStuff::lock | ( | $key, | |
$timeout = 0 |
|||
) |
$key | string |
$timeout | int |
Reimplemented from BagOStuff.
Definition at line 150 of file MultiWriteBagOStuff.php.
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.
References doWrite().
MultiWriteBagOStuff::replace | ( | $key, | |
$value, | |||
$exptime = 0 |
|||
) |
$key | string |
$value | mixed |
$exptime | int |
Reimplemented from BagOStuff.
Definition at line 123 of file MultiWriteBagOStuff.php.
MultiWriteBagOStuff::set | ( | $key, | |
$value, | |||
$exptime = 0 |
|||
) |
$key | string |
$value | mixed |
$exptime | int |
Reimplemented from BagOStuff.
Definition at line 94 of file MultiWriteBagOStuff.php.
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.
MultiWriteBagOStuff::$caches |
Definition at line 32 of file MultiWriteBagOStuff.php.