Singleton class wrapping APC caching.
| see | \global\DStructCacheInterface |
|---|---|
| package | dstruct_common |
add(string $key, mixed $var, integer $expire) : boolean
| see | \DStructCacheInterface::add() |
|---|
string
mixed
integerTime the data is valid for in seconds
booleanTRUE if value was actually added, FALSE if otherwisedelete(string $key) : boolean
get(string $key) : mixed
getInstance() : object
Objects are singletons and so use this method to get an instance. If you impliment this interface, it is recommended that you declare the __constructor() as protected
| see | \DStructCacheInterface::getInstance() |
|---|---|
| todo | rewrite to handle pools |
objecthasServer() : boolean
Is the cache server this object uses available to be used by the system
booleanhits() : integer
Not persistent. Counts the number of times this cache object has been queried and returned existing data. Please check the documentation for each classes implimentation of this method, as the functionallity may vary across classes.
| see | \DStructCacheInterface::hits() |
|---|
integermisses() : integer
Not persistent. Counts the number of times this cache object has been queried but had no data for that key. Please check the documentation for each classes implimentation of this method, as the functionallity may vary across classes.
| see | \DStructCacheInterface::misses() |
|---|
integerset(string $key, mixed $var, integer $expire) : boolean
Default expiration is one week (604800).
| see | \DStructCacheInterface::set() |
|---|
string
mixed
integerTime the data is valid for in seconds
booleanTRUE if value was actually added, FALSE if otherwisewrites()
Not persistent. Counts the number of times this cache object has been written to. Please check the documentation for each classes implimentation of this method, as the functionallity may vary across classes.
| see | \DStructCacheInterface::writes() |
|---|
__construct()
Creating instance of class checks whether APC is available or not: APCCache::hasServer()
$failedwrites : integer
$hasserver : boolean
$hits : integer
$instance : mixed
$misses : integer
$writes : integer