MediaWiki
1.23.2
|
A wrapper class for the pure-PHP memcached client, exposing a BagOStuff interface. More...
Public Member Functions | |
__construct ( $params) | |
Constructor. More... | |
decr ( $key, $value=1) | |
getMulti (array $keys) | |
incr ( $key, $value=1) | |
lock ( $key, $timeout=0) | |
setDebug ( $debug) | |
unlock ( $key) | |
Public Member Functions inherited from MemcachedBagOStuff | |
add ( $key, $value, $exptime=0) | |
cas ( $casToken, $key, $value, $exptime=0) | |
decodeKey ( $key) | |
Decode a key encoded with encodeKey(). More... | |
delete ( $key, $time=0) | |
encodeKey ( $key) | |
Encode a key for use on the wire inside the memcached protocol. More... | |
fixExpiry ( $expiry) | |
TTLs higher than 30 days will be detected as absolute TTLs (UNIX timestamps), and will result in the cache entry being discarded immediately because the expiry is in the past. More... | |
get ( $key, &$casToken=null) | |
getClient () | |
Get the underlying client object. More... | |
set ( $key, $value, $exptime=0) | |
Public Member Functions inherited from BagOStuff | |
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... | |
merge ( $key, closure $callback, $exptime=0, $attempts=10) | |
Merge changes into the existing cache value (possibly creating a new one). More... | |
replace ( $key, $value, $exptime=0) | |
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 MemcachedBagOStuff | |
applyDefaultParams ( $params) | |
Fill in the defaults for any parameters missing from $params, using the backwards-compatible global variables. More... | |
debugLog ( $text) | |
Send a debug message to the log. More... | |
encodeKeyCallback ( $m) | |
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 MemcachedBagOStuff | |
$client | |
Protected Attributes inherited from BagOStuff | |
$lastError = self::ERR_NONE | |
A wrapper class for the pure-PHP memcached client, exposing a BagOStuff interface.
Definition at line 29 of file MemcachedPhpBagOStuff.php.
MemcachedPhpBagOStuff::__construct | ( | $params | ) |
Constructor.
Available parameters are:
$params | array |
Definition at line 44 of file MemcachedPhpBagOStuff.php.
References $params, and MemcachedBagOStuff\applyDefaultParams().
MemcachedPhpBagOStuff::decr | ( | $key, | |
$value = 1 |
|||
) |
$key | string |
$value | int |
Reimplemented from BagOStuff.
Definition at line 99 of file MemcachedPhpBagOStuff.php.
References $value, and MemcachedBagOStuff\encodeKey().
MemcachedPhpBagOStuff::getMulti | ( | array | $keys | ) |
$keys | Array |
Reimplemented from BagOStuff.
Definition at line 63 of file MemcachedPhpBagOStuff.php.
MemcachedPhpBagOStuff::incr | ( | $key, | |
$value = 1 |
|||
) |
$key | string |
$value | int |
Reimplemented from BagOStuff.
Definition at line 90 of file MemcachedPhpBagOStuff.php.
References $value, and MemcachedBagOStuff\encodeKey().
MemcachedPhpBagOStuff::lock | ( | $key, | |
$timeout = 0 |
|||
) |
$key | |
$timeout | int |
Reimplemented from BagOStuff.
Definition at line 73 of file MemcachedPhpBagOStuff.php.
References MemcachedBagOStuff\encodeKey().
MemcachedPhpBagOStuff::setDebug | ( | $debug | ) |
$debug | bool |
Reimplemented from BagOStuff.
Definition at line 55 of file MemcachedPhpBagOStuff.php.
References $debug.
MemcachedPhpBagOStuff::unlock | ( | $key | ) |
$key | string |
Reimplemented from BagOStuff.
Definition at line 81 of file MemcachedPhpBagOStuff.php.
References MemcachedBagOStuff\encodeKey().