MediaWiki
REL1_22
|
Wrapper for XCache object caching functions; identical interface to the APC wrapper. 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. | |
delete ($key, $time=0) | |
Remove a value from the XCache object cache. | |
get ($key, &$casToken=null) | |
Get a value from the XCache object cache. | |
incr ($key, $value=1) | |
Increase stored value of $key by $value while preserving its TTL. | |
merge ($key, closure $callback, $exptime=0, $attempts=10) | |
Merge an item. | |
set ($key, $value, $expire=0) | |
Store a value in the XCache object cache. |
Wrapper for XCache object caching functions; identical interface to the APC wrapper.
Definition at line 30 of file XCacheBagOStuff.php.
XCacheBagOStuff::cas | ( | $ | casToken, |
$ | key, | ||
$ | value, | ||
$ | exptime = 0 |
||
) |
$casToken | mixed |
$key | string |
$value | mixed |
$exptime | int |
Reimplemented from BagOStuff.
Definition at line 78 of file XCacheBagOStuff.php.
XCacheBagOStuff::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 114 of file XCacheBagOStuff.php.
XCacheBagOStuff::delete | ( | $ | key, |
$ | time = 0 |
||
) |
Remove a value from the XCache object cache.
string | $key | cache key |
int | $time | not used in this implementation |
Reimplemented from BagOStuff.
Definition at line 90 of file XCacheBagOStuff.php.
References $key.
XCacheBagOStuff::get | ( | $ | key, |
&$ | casToken = null |
||
) |
Get a value from the XCache object cache.
string | $key | cache key |
$casToken | mixed: cas token |
Reimplemented from BagOStuff.
Definition at line 38 of file XCacheBagOStuff.php.
References $key, and BagOStuff\isInteger().
XCacheBagOStuff::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 110 of file XCacheBagOStuff.php.
XCacheBagOStuff::merge | ( | $ | key, |
closure $ | callback, | ||
$ | exptime = 0 , |
||
$ | attempts = 10 |
||
) |
Merge an item.
XCache does not seem to support any way of performing CAS - this however will provide a way to perform CAS-like functionality.
$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 106 of file XCacheBagOStuff.php.
References $key, and BagOStuff\mergeViaLock().
XCacheBagOStuff::set | ( | $ | key, |
$ | value, | ||
$ | expire = 0 |
||
) |
Store a value in the XCache object cache.
string | $key | cache key |
$value | Mixed: object to store | |
int | $expire | expiration time |
Reimplemented from BagOStuff.
Definition at line 62 of file XCacheBagOStuff.php.
References $key, $value, and BagOStuff\isInteger().