MediaWiki  REL1_24
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:
mixed$casToken
string$key
mixed$value
int$exptime
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:
string$key
int$value
Returns:
int

Reimplemented from BagOStuff.

Definition at line 105 of file APCBagOStuff.php.

References $key, and $value.

APCBagOStuff::delete ( key,
time = 0 
)
Parameters:
string$key
int$time
Returns:
bool

Reimplemented from BagOStuff.

Definition at line 84 of file APCBagOStuff.php.

References $key.

APCBagOStuff::get ( key,
&$  casToken = null 
)
Parameters:
string$key
int$casToken[optional]
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
int$valueValue to add to $key (Default 1)
Returns:
int|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:
string$key
Closure$callbackCallback 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:
string$key
mixed$value
int$exptime
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: