MediaWiki
REL1_21
|
A wrapper class for the PECL memcached client. More...
Public Member Functions | |
__construct ($params) | |
Constructor. | |
add ($key, $value, $exptime=0) | |
cas ($casToken, $key, $value, $exptime=0) | |
decr ($key, $value=1) | |
delete ($key, $time=0) | |
get ($key, &$casToken=null) | |
getMulti (array $keys) | |
incr ($key, $value=1) | |
replace ($key, $value, $exptime=0) | |
set ($key, $value, $exptime=0) | |
Protected Member Functions | |
checkResult ($key, $result) | |
Check the return value from a client method call and take any necessary action. |
A wrapper class for the PECL memcached client.
Definition at line 29 of file MemcachedPeclBagOStuff.php.
MemcachedPeclBagOStuff::__construct | ( | $ | params | ) |
Constructor.
Available parameters are:
Definition at line 44 of file MemcachedPeclBagOStuff.php.
References $params, MemcachedBagOStuff\applyDefaultParams(), array(), as, IP\splitHostAndPort(), and wfDebug().
MemcachedPeclBagOStuff::add | ( | $ | key, |
$ | value, | ||
$ | exptime = 0 |
||
) |
$key | string |
$value | int |
$exptime | int |
Reimplemented from MemcachedBagOStuff.
Definition at line 164 of file MemcachedPeclBagOStuff.php.
References $value, add, checkResult(), and MemcachedBagOStuff\debugLog().
MemcachedPeclBagOStuff::cas | ( | $ | casToken, |
$ | key, | ||
$ | value, | ||
$ | exptime = 0 |
||
) |
$casToken | float |
$key | string |
$value | |
$exptime | int |
Reimplemented from MemcachedBagOStuff.
Definition at line 137 of file MemcachedPeclBagOStuff.php.
References $value, checkResult(), and MemcachedBagOStuff\debugLog().
MemcachedPeclBagOStuff::checkResult | ( | $ | key, |
$ | result | ||
) | [protected] |
Check the return value from a client method call and take any necessary action.
Returns the value that the wrapper function should return. At present, the return value is always the same as the return value from the client, but some day we might find a case where it should be different.
string | $key | The key used by the caller, or false if there wasn't one. |
$result | Mixed The return value |
Definition at line 213 of file MemcachedPeclBagOStuff.php.
References $result, MemcachedBagOStuff\debugLog(), and wfDebugLog().
Referenced by add(), cas(), decr(), delete(), get(), getMulti(), incr(), replace(), and set().
MemcachedPeclBagOStuff::decr | ( | $ | key, |
$ | value = 1 |
||
) |
$key | string |
$value | int |
Reimplemented from BagOStuff.
Definition at line 196 of file MemcachedPeclBagOStuff.php.
References $result, $value, checkResult(), and MemcachedBagOStuff\debugLog().
MemcachedPeclBagOStuff::delete | ( | $ | key, |
$ | time = 0 |
||
) |
$key | string |
$time | int |
Reimplemented from MemcachedBagOStuff.
Definition at line 147 of file MemcachedPeclBagOStuff.php.
References $result, $time, checkResult(), and MemcachedBagOStuff\debugLog().
MemcachedPeclBagOStuff::get | ( | $ | key, |
&$ | casToken = null |
||
) |
$key | string |
$casToken[optional] | float |
Reimplemented from MemcachedBagOStuff.
Definition at line 110 of file MemcachedPeclBagOStuff.php.
References $result, checkResult(), MemcachedBagOStuff\debugLog(), MemcachedBagOStuff\encodeKey(), wfProfileIn(), and wfProfileOut().
MemcachedPeclBagOStuff::getMulti | ( | array $ | keys | ) |
$keys | Array |
Reimplemented from BagOStuff.
Definition at line 243 of file MemcachedPeclBagOStuff.php.
References $result, array(), checkResult(), MemcachedBagOStuff\debugLog(), wfProfileIn(), and wfProfileOut().
MemcachedPeclBagOStuff::incr | ( | $ | key, |
$ | value = 1 |
||
) |
$key | string |
$value | int |
Reimplemented from BagOStuff.
Definition at line 185 of file MemcachedPeclBagOStuff.php.
References $result, $value, checkResult(), and MemcachedBagOStuff\debugLog().
MemcachedPeclBagOStuff::replace | ( | $ | key, |
$ | value, | ||
$ | exptime = 0 |
||
) |
$key | string |
$value | int |
$exptime |
Reimplemented from MemcachedBagOStuff.
Definition at line 175 of file MemcachedPeclBagOStuff.php.
References $value, checkResult(), and MemcachedBagOStuff\debugLog().
MemcachedPeclBagOStuff::set | ( | $ | key, |
$ | value, | ||
$ | exptime = 0 |
||
) |
$key | string |
$value | |
$exptime | int |
Reimplemented from MemcachedBagOStuff.
Definition at line 125 of file MemcachedPeclBagOStuff.php.
References $value, checkResult(), MemcachedBagOStuff\debugLog(), and set.