\Hazaar\Cache
Output
Summary
Methods Properties Constants
get
has
off
on
set
No constants
Properties
$key
$key
Inherited
$options
$options
Inherited
$use_cache
$use_cache
Methods
start()
start($key)

Parameters

$key

No description

stop()
stop()
Inherited
__isset()
__isset($key)

Parameters

$key

No description

Inherited
__set()
__set($key, $value)

Parameters

$key

No description

$value

No description

Inherited
__unset()
__unset($key)

Parameters

$key

No description

Inherited
clear()
clear()
Inherited
configure()
configure($options)

Parameters

$options

No description

Inherited
extend()
extend($array, $recursive = false)

Parameters

$array

No description

$recursive

No description

Inherited
get()
get($key, $default = false, $save_default = false) : mixed
Retrieve a value from cache storage.

Parameters

$keymixed

The reference key used to store the value.

$default\Hazaar\Cache\bool

If the value doesn’t exist, this default will be returned instead.

$save_default\Hazaar\Cache\bool

If the value doesn’t exist and a default is specified, save that default to cache.

Returns

mixed

The value that was stored in cache.

Inherited
getBackend()
getBackend()
Inherited
has()
has($key) : boolean
Check if a stored value exists.

Parameters

$keymixed

The value key to check for.

Returns

boolean

Returns TRUE or FALSE indicating if the value is stored.

Inherited
off()
off()
Enable the use of cache

Cache is enabled by default. This is to allow cache to be re-enabled after calling off().

This method can also be used to force cache back on after being disabled by a “Pragma: no-cache” header in the case where the use_pragma setting is enabled (which is the default).

Inherited
offsetExists()
offsetExists($offset)

Parameters

$offset

No description

Inherited
offsetGet()
offsetGet($offset)

Parameters

$offset

No description

Inherited
offsetSet()
offsetSet($offset, $value)

Parameters

$offset

No description

$value

No description

Inherited
offsetUnset()
offsetUnset($offset)

Parameters

$offset

No description

Inherited
on()
on()
Disable the use of cache

This allows a cache object to be disabled but still be used without having to modify existing application code. The application can still call the get() method but it will always return false, simulating a negative cache response. Calling set() will still have an affect however.

Inherited
pull()
pull($key)

Parameters

$key

No description

Inherited
remove()
remove($key) : boolean
Removes a stored value

Parameters

$keymixed

The key of the value to remove

Returns

boolean

tRUE indicates the value existed and was removed. FALSE otherwise.

Inherited
set()
set($key, $value, $timeout = null) : boolean
Store a value in the cache using the current cache backend.

Parameters

$keymixed

The reference key under which to store the value.

$valuemixed

The value that should be stored. Values can be pretty much anything including integers, booleans, strings and any object that can be serialised.

$timeoutmixed

The number of seconds after which the value becomes invalid. If not set the global ‘lifetime’ option is used. Set a value of ‘-1’ to indicate that the value should never timeout.

Returns

boolean

Boolean indicating whether or not the operation succeeded.

Inherited
setBackendOption()
setBackendOption($key, $value)

Parameters

$key

No description

$value

No description

Inherited
setValues()
setValues($values)

Parameters

$values

No description

Inherited
toArray()
toArray()