If there is not cache available, then the bootstrap uses this class.

NullCache impliments DStructCacheInterface, but will always show that no cache is available. Any attempted writes or reads will fail as exected with failed reads / writes with any other DStruct cache object.

package dstruct_common

 Methods

Add method.

add(string $key, string $var, integer $expire) : boolean

Will always return false.

see \DStructCacheInterface::add()

Parameters

$key

string

$var

string

data to add

$expire

integer

Returns

booleanTRUE if value was actually added, FALSE if otherwise

Delet from cache

delete(string $key) : boolean
see \DStructCacheInterface::delete()

Parameters

$key

string

Returns

boolean

(non-PHPdoc)

get(string $key) : mixed
see \DStructCacheInterface::get()

Parameters

$key

string

Returns

mixed

Get instance of this Singleton class.

getInstance() : object
Static

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

Returns

object

(non-PHPdoc)

hasServer() : boolean

Is the cache server this object uses available to be used by the system

see \DStructCacheInterface::hasServer()

Returns

boolean

(non-PHPdoc)

hits() : 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()

Returns

integer

(non-PHPdoc)

misses() 

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()

(non-PHPdoc)

set(string $key, string $var, integer $expire) : boolean
see \DStructCacheInterface::set()

Parameters

$key

string

$var

string

$expire

integer

Returns

booleanTRUE if value was actually added, FALSE if otherwise

(non-PHPdoc)

writes() 

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()

Class constructor

__construct() 

 Properties

 

$failedwrites : integer
 

$hasserver : boolean
 

$instance : object
 

$misses : integer