MediaWiki  REL1_20
EhcacheBagOStuff Class Reference

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

Inheritance diagram for EhcacheBagOStuff:
Collaboration diagram for EhcacheBagOStuff:

List of all members.

Public Member Functions

 __construct ($params)
 delete ($key, $time=0)
 get ($key)
 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.

Detailed Description

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.


Constructor & Destructor Documentation

Parameters:
$paramsarray

Definition at line 39 of file EhcacheBagOStuff.php.

References $params.


Member Function Documentation

EhcacheBagOStuff::attemptPut ( key,
data,
type,
ttl 
) [protected]
Parameters:
$keystring
$data
$type
$ttl
Returns:
int

Definition at line 204 of file EhcacheBagOStuff.php.

References $response, and doItemRequest().

Referenced by set().

EhcacheBagOStuff::createCache ( key) [protected]
Parameters:
$keystring
Returns:
bool

Definition at line 232 of file EhcacheBagOStuff.php.

References $response, doCacheRequest(), and wfDebug().

Referenced by set().

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

Reimplemented from BagOStuff.

Definition at line 151 of file EhcacheBagOStuff.php.

References $response, $result, doItemRequest(), wfDebug(), wfProfileIn(), and wfProfileOut().

EhcacheBagOStuff::doCacheRequest ( key,
curlOptions = array() 
) [protected]
Parameters:
$keystring
$curlOptionsarray
Returns:
array|bool|mixed

Definition at line 253 of file EhcacheBagOStuff.php.

References $curlOptions, doRequest(), getCacheUrl(), and getCurl().

Referenced by createCache().

EhcacheBagOStuff::doItemRequest ( key,
curlOptions = array() 
) [protected]
Parameters:
$keystring
$curlOptionsarray
Returns:
array|bool|mixed

Definition at line 264 of file EhcacheBagOStuff.php.

References $curlOptions, $url, doRequest(), getCacheUrl(), and getCurl().

Referenced by attemptPut(), delete(), and get().

EhcacheBagOStuff::doRequest ( curl,
url,
curlOptions = array() 
) [protected]
Parameters:
$curl
$urlstring
$curlOptionsarray
Returns:
array|bool|mixed
Exceptions:
MWException

Definition at line 278 of file EhcacheBagOStuff.php.

References $curlOptions, $result, $url, and wfDebug().

Referenced by doCacheRequest(), and doItemRequest().

Parameters:
$keystring
Returns:
bool|mixed

Reimplemented from BagOStuff.

Definition at line 69 of file EhcacheBagOStuff.php.

References $response, doItemRequest(), wfDebug(), wfProfileIn(), and wfProfileOut().

EhcacheBagOStuff::getCacheUrl ( key) [protected]
Parameters:
$keystring
Returns:
string

Definition at line 170 of file EhcacheBagOStuff.php.

References $hashes.

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 190 of file EhcacheBagOStuff.php.

Referenced by doCacheRequest(), and doItemRequest().

EhcacheBagOStuff::set ( key,
value,
expiry = 0 
)
Parameters:
$keystring
$valuemixed
$expiryint
Returns:
bool

Reimplemented from BagOStuff.

Definition at line 109 of file EhcacheBagOStuff.php.

References $blob, $result, $value, attemptPut(), BagOStuff\convertExpiry(), createCache(), wfDebug(), wfProfileIn(), and wfProfileOut().


Member Data Documentation

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.


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