MediaWiki  REL1_19
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)
 Delete an item.
 get ($key)
 Get an item with the given key.
 set ($key, $value, $expiry=0)
 Set an item.

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


Constructor & Destructor Documentation

Definition at line 13 of file EhcacheBagOStuff.php.


Member Function Documentation

EhcacheBagOStuff::attemptPut ( key,
data,
type,
ttl 
) [protected]

Definition at line 152 of file EhcacheBagOStuff.php.

References doItemRequest().

Referenced by set().

Here is the call graph for this function:

Here is the caller graph for this function:

EhcacheBagOStuff::createCache ( key) [protected]

Definition at line 176 of file EhcacheBagOStuff.php.

References doCacheRequest(), and wfDebug().

Referenced by set().

Here is the call graph for this function:

Here is the caller graph for this function:

EhcacheBagOStuff::delete ( key,
time = 0 
)

Delete an item.

Parameters:
$keystring
$timeint Amount of time to delay the operation (mostly memcached-specific)

Reimplemented from BagOStuff.

Definition at line 110 of file EhcacheBagOStuff.php.

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

Here is the call graph for this function:

EhcacheBagOStuff::doCacheRequest ( key,
curlOptions = array() 
) [protected]

Definition at line 197 of file EhcacheBagOStuff.php.

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

Referenced by createCache().

Here is the call graph for this function:

Here is the caller graph for this function:

EhcacheBagOStuff::doItemRequest ( key,
curlOptions = array() 
) [protected]

Definition at line 203 of file EhcacheBagOStuff.php.

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

EhcacheBagOStuff::doRequest ( curl,
url,
curlOptions = array() 
) [protected]

Definition at line 210 of file EhcacheBagOStuff.php.

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

Referenced by doCacheRequest(), and doItemRequest().

Here is the call graph for this function:

Here is the caller graph for this function:

Get an item with the given key.

Returns false if it does not exist.

Parameters:
$keystring
Returns:
bool|Object

Reimplemented from BagOStuff.

Definition at line 39 of file EhcacheBagOStuff.php.

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

Here is the call graph for this function:

EhcacheBagOStuff::getCacheUrl ( key) [protected]

Definition at line 125 of file EhcacheBagOStuff.php.

References $hashes.

Referenced by doCacheRequest(), and doItemRequest().

Here is the caller graph for this function:

EhcacheBagOStuff::getCurl ( cacheUrl) [protected]

Get a cURL handle for the given cache URL.

We cache the handles to allow keepalive.

Definition at line 145 of file EhcacheBagOStuff.php.

Referenced by doCacheRequest(), and doItemRequest().

Here is the caller graph for this function:

EhcacheBagOStuff::set ( key,
value,
exptime = 0 
)

Set an item.

Parameters:
$keystring
$valuemixed
$exptimeint Either an interval in seconds or a unix timestamp for expiry

Reimplemented from BagOStuff.

Definition at line 73 of file EhcacheBagOStuff.php.

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

Here is the call graph for this function:


Member Data Documentation

EhcacheBagOStuff::$cacheName

Definition at line 8 of file EhcacheBagOStuff.php.

EhcacheBagOStuff::$connectTimeout

Definition at line 8 of file EhcacheBagOStuff.php.

EhcacheBagOStuff::$curlOptions

Definition at line 8 of file EhcacheBagOStuff.php.

Referenced by doCacheRequest(), doItemRequest(), and doRequest().

EhcacheBagOStuff::$curls = array()

Definition at line 11 of file EhcacheBagOStuff.php.

EhcacheBagOStuff::$requestData

Definition at line 8 of file EhcacheBagOStuff.php.

EhcacheBagOStuff::$requestDataPos

Definition at line 8 of file EhcacheBagOStuff.php.

EhcacheBagOStuff::$servers

Definition at line 8 of file EhcacheBagOStuff.php.

EhcacheBagOStuff::$timeout

Definition at line 8 of file EhcacheBagOStuff.php.


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