MediaWiki  REL1_22
APCBagOStuff Class Reference

This is a wrapper for APC's shared memory functions. More...

Inheritance diagram for APCBagOStuff:
Collaboration diagram for APCBagOStuff:

List of all members.

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)
 get ($key, &$casToken=null)
 incr ($key, $value=1)
 Increase stored value of $key by $value while preserving its TTL.
 merge ($key, closure $callback, $exptime=0, $attempts=10)
 set ($key, $value, $exptime=0)

Detailed Description

This is a wrapper for APC's shared memory functions.

Definition at line 29 of file APCBagOStuff.php.


Member Function Documentation

APCBagOStuff::cas ( casToken,
key,
value,
exptime = 0 
)
Parameters:
$casTokenmixed
$keystring
$valuemixed
$exptimeint
Returns:
bool

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.

Parameters:
$keyString
$valueInteger
Returns:
integer

Reimplemented from BagOStuff.

Definition at line 105 of file APCBagOStuff.php.

References $key, and $value.

APCBagOStuff::delete ( key,
time = 0 
)
Parameters:
$keystring
$timeint
Returns:
bool

Reimplemented from BagOStuff.

Definition at line 84 of file APCBagOStuff.php.

References $key.

APCBagOStuff::get ( key,
&$  casToken = null 
)
Parameters:
$keystring
$casToken[optional]int
Returns:
mixed

Reimplemented from BagOStuff.

Definition at line 35 of file APCBagOStuff.php.

References $key, and BagOStuff\isInteger().

APCBagOStuff::incr ( key,
value = 1 
)

Increase stored value of $key by $value while preserving its TTL.

Parameters:
string$keyKey to increase
$valueInteger: Value to add to $key (Default 1)
Returns:
integer|bool New value or false on failure

Reimplemented from BagOStuff.

Definition at line 101 of file APCBagOStuff.php.

References $key, and $value.

APCBagOStuff::merge ( key,
closure $  callback,
exptime = 0,
attempts = 10 
)
Parameters:
$keystring
$callbackclosure Callback method to be executed
int$exptimeEither an interval in seconds or a unix timestamp for expiry
int$attemptsThe amount of times to attempt a merge in case of failure
Returns:
bool success

Reimplemented from BagOStuff.

Definition at line 97 of file APCBagOStuff.php.

References $key, and BagOStuff\mergeViaLock().

APCBagOStuff::set ( key,
value,
exptime = 0 
)
Parameters:
$keystring
$valuemixed
$exptimeint
Returns:
bool

Reimplemented from BagOStuff.

Definition at line 57 of file APCBagOStuff.php.

References $key, $value, and BagOStuff\isInteger().


The documentation for this class was generated from the following file: