MediaWiki
1.23.3
|
This is a wrapper for APC's shared memory functions. More...
Public Member Functions | |
cas ( $casToken, $key, $value, $exptime=0) | |
decr ( $key, $value=1) | |
Decrease stored value of $key by $value while preserving its TTL. More... | |
delete ( $key, $time=0) | |
get ( $key, &$casToken=null) | |
incr ( $key, $value=1) | |
Increase stored value of $key by $value while preserving its TTL. More... | |
merge ( $key, closure $callback, $exptime=0, $attempts=10) | |
set ( $key, $value, $exptime=0) | |
Public Member Functions inherited from BagOStuff | |
add ( $key, $value, $exptime=0) | |
clearLastError () | |
Clear the "last error" registry. More... | |
debug ( $text) | |
deleteObjectsExpiringBefore ( $date, $progressCallback=false) | |
Delete all objects expiring before a certain date. More... | |
getLastError () | |
Get the "last error" registered; clearLastError() should be called manually. More... | |
getMulti (array $keys) | |
Get an associative array containing the item for each of the keys that have items. More... | |
lock ( $key, $timeout=6) | |
replace ( $key, $value, $exptime=0) | |
setDebug ( $bool) | |
unlock ( $key) | |
Additional Inherited Members | |
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 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... | |
Protected Attributes inherited from BagOStuff | |
$lastError = self::ERR_NONE | |
This is a wrapper for APC's shared memory functions.
Definition at line 29 of file APCBagOStuff.php.
APCBagOStuff::cas | ( | $casToken, | |
$key, | |||
$value, | |||
$exptime = 0 |
|||
) |
$casToken | mixed |
$key | string |
$value | mixed |
$exptime | int |
Reimplemented from BagOStuff.
Definition at line 74 of file APCBagOStuff.php.
APCBagOStuff::decr | ( | $key, | |
$value = 1 |
|||
) |
Decrease stored value of $key by $value while preserving its TTL.
$key | String |
$value | Integer |
Reimplemented from BagOStuff.
Definition at line 105 of file APCBagOStuff.php.
References $value.
APCBagOStuff::delete | ( | $key, | |
$time = 0 |
|||
) |
$key | string |
$time | int |
Reimplemented from BagOStuff.
Definition at line 84 of file APCBagOStuff.php.
APCBagOStuff::get | ( | $key, | |
& | $casToken = null |
||
) |
$key | string |
$casToken[optional] | int |
Reimplemented from BagOStuff.
Definition at line 35 of file APCBagOStuff.php.
References BagOStuff\isInteger().
APCBagOStuff::incr | ( | $key, | |
$value = 1 |
|||
) |
Increase stored value of $key by $value while preserving its TTL.
string | $key | Key to increase |
$value | Integer: Value to add to $key (Default 1) |
Reimplemented from BagOStuff.
Definition at line 101 of file APCBagOStuff.php.
References $value.
APCBagOStuff::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 97 of file APCBagOStuff.php.
References BagOStuff\mergeViaLock().
APCBagOStuff::set | ( | $key, | |
$value, | |||
$exptime = 0 |
|||
) |
$key | string |
$value | mixed |
$exptime | int |
Reimplemented from BagOStuff.
Definition at line 57 of file APCBagOStuff.php.
References $value, and BagOStuff\isInteger().