|
MediaWiki
REL1_22
|
Client for the Ehcache RESTful web service - http://ehcache.org/documentation/cache_server.html TODO: Simplify configuration and add to the installer. More...


Public Member Functions | |
| __construct ($params) | |
| cas ($casToken, $key, $value, $exptime=0) | |
| delete ($key, $time=0) | |
| get ($key, &$casToken=null) | |
| merge ($key, closure $callback, $exptime=0, $attempts=10) | |
| set ($key, $value, $expiry=0) | |
Public Attributes | |
| $cacheName | |
| $connectTimeout | |
| $curlOptions | |
| $curls = array() | |
| $requestData | |
| $requestDataPos | |
| $servers | |
| $timeout | |
Protected Member Functions | |
| attemptPut ($key, $data, $type, $ttl) | |
| createCache ($key) | |
| doCacheRequest ($key, $curlOptions=array()) | |
| doItemRequest ($key, $curlOptions=array()) | |
| doRequest ($curl, $url, $curlOptions=array()) | |
| getCacheUrl ($key) | |
| getCurl ($cacheUrl) | |
| Get a cURL handle for the given cache URL. | |
Client for the Ehcache RESTful web service - http://ehcache.org/documentation/cache_server.html TODO: Simplify configuration and add to the installer.
Definition at line 30 of file EhcacheBagOStuff.php.
| EhcacheBagOStuff::__construct | ( | $ | params | ) |
| $params | array |
| MWException |
Definition at line 40 of file EhcacheBagOStuff.php.
| EhcacheBagOStuff::attemptPut | ( | $ | key, |
| $ | data, | ||
| $ | type, | ||
| $ | ttl | ||
| ) | [protected] |
| $key | string |
| $data | |
| $type | |
| $ttl |
Definition at line 230 of file EhcacheBagOStuff.php.
References $key, $response, array(), and doItemRequest().
Referenced by set().
| EhcacheBagOStuff::cas | ( | $ | casToken, |
| $ | key, | ||
| $ | value, | ||
| $ | exptime = 0 |
||
| ) |
| $casToken | mixed |
| $key | string |
| $value | mixed |
| $exptime | int |
Reimplemented from BagOStuff.
Definition at line 157 of file EhcacheBagOStuff.php.
| EhcacheBagOStuff::createCache | ( | $ | key | ) | [protected] |
| $key | string |
Definition at line 258 of file EhcacheBagOStuff.php.
References $key, $response, array(), doCacheRequest(), and wfDebug().
Referenced by set().
| EhcacheBagOStuff::delete | ( | $ | key, |
| $ | time = 0 |
||
| ) |
| $key | string |
| $time | int |
Reimplemented from BagOStuff.
Definition at line 169 of file EhcacheBagOStuff.php.
References $key, $response, $result, array(), doItemRequest(), wfDebug(), wfProfileIn(), and wfProfileOut().
| EhcacheBagOStuff::doCacheRequest | ( | $ | key, |
| $ | curlOptions = array() |
||
| ) | [protected] |
| $key | string |
| $curlOptions | array |
Definition at line 279 of file EhcacheBagOStuff.php.
References $curlOptions, $key, doRequest(), getCacheUrl(), and getCurl().
Referenced by createCache().
| EhcacheBagOStuff::doItemRequest | ( | $ | key, |
| $ | curlOptions = array() |
||
| ) | [protected] |
| $key | string |
| $curlOptions | array |
Definition at line 290 of file EhcacheBagOStuff.php.
References $curlOptions, $key, doRequest(), getCacheUrl(), and getCurl().
Referenced by attemptPut(), delete(), and get().
| EhcacheBagOStuff::doRequest | ( | $ | curl, |
| $ | url, | ||
| $ | curlOptions = array() |
||
| ) | [protected] |
| $curl | |
| $url | string |
| $curlOptions | array |
| MWException |
Definition at line 304 of file EhcacheBagOStuff.php.
References $curlOptions, $result, and wfDebug().
Referenced by doCacheRequest(), and doItemRequest().
| EhcacheBagOStuff::get | ( | $ | key, |
| &$ | casToken = null |
||
| ) |
| $key | string |
| $casToken[optional] | mixed |
Reimplemented from BagOStuff.
Definition at line 71 of file EhcacheBagOStuff.php.
References $key, $response, doItemRequest(), wfDebug(), wfProfileIn(), and wfProfileOut().
| EhcacheBagOStuff::getCacheUrl | ( | $ | key | ) | [protected] |
| $key | string |
Definition at line 196 of file EhcacheBagOStuff.php.
References $hashes, $key, array(), as, key, and servers.
Referenced by doCacheRequest(), and doItemRequest().
| EhcacheBagOStuff::getCurl | ( | $ | cacheUrl | ) | [protected] |
Get a cURL handle for the given cache URL.
We cache the handles to allow keepalive.
Definition at line 216 of file EhcacheBagOStuff.php.
Referenced by doCacheRequest(), and doItemRequest().
| EhcacheBagOStuff::merge | ( | $ | key, |
| closure $ | callback, | ||
| $ | exptime = 0, |
||
| $ | attempts = 10 |
||
| ) |
Reimplemented from BagOStuff.
Definition at line 188 of file EhcacheBagOStuff.php.
References $key, and BagOStuff\mergeViaLock().
| EhcacheBagOStuff::set | ( | $ | key, |
| $ | value, | ||
| $ | expiry = 0 |
||
| ) |
| $key | string |
| $value | mixed |
| $expiry | int |
Reimplemented from BagOStuff.
Definition at line 113 of file EhcacheBagOStuff.php.
References $blob, $key, $result, $value, attemptPut(), BagOStuff\convertExpiry(), createCache(), wfDebug(), wfProfileIn(), and wfProfileOut().
| EhcacheBagOStuff::$cacheName |
Definition at line 31 of file EhcacheBagOStuff.php.
| EhcacheBagOStuff::$connectTimeout |
Definition at line 31 of file EhcacheBagOStuff.php.
| EhcacheBagOStuff::$curlOptions |
Definition at line 31 of file EhcacheBagOStuff.php.
Referenced by doCacheRequest(), doItemRequest(), and doRequest().
| EhcacheBagOStuff::$curls = array() |
Definition at line 34 of file EhcacheBagOStuff.php.
| EhcacheBagOStuff::$requestData |
Definition at line 31 of file EhcacheBagOStuff.php.
| EhcacheBagOStuff::$requestDataPos |
Definition at line 31 of file EhcacheBagOStuff.php.
| EhcacheBagOStuff::$servers |
Definition at line 31 of file EhcacheBagOStuff.php.
| EhcacheBagOStuff::$timeout |
Definition at line 31 of file EhcacheBagOStuff.php.