Class MockCache

Summary

Fully Qualified Name: CodeIgniter\Test\Mock\MockCache
Implements: CacheInterface

Description

Methods

Name Description Defined By
clean() Will delete all items in the entire cache. MockCache
decrement() Performs atomic decrementation of a raw stored value. MockCache
delete() Deletes a specific item from the cache store. MockCache
get() Attempts to fetch an item from the cache store. MockCache
getCacheInfo() Returns information on the entire cache. MockCache
getMetaData() Returns detailed information about the specific item in the cache. MockCache
increment() Performs atomic incrementation of a raw stored value. MockCache
initialize() Takes care of any handler-specific setup that must be done. MockCache
isSupported() Determines if the driver is supported on this system. MockCache
save() Saves an item to the cache store. MockCache

Method Details

clean()

Will delete all items in the entire cache.

Returns: mixed

decrement()

Performs atomic decrementation of a raw stored value.

Parameter Name Type Description
$key string Cache
$offset int Step/value

Returns: mixed

delete()

Deletes a specific item from the cache store.

Parameter Name Type Description
$key string Cache

Returns: mixed

get()

Attempts to fetch an item from the cache store.

Parameter Name Type Description
$key string Cache

Returns: mixed

getCacheInfo()

Returns information on the entire cache.

The information returned and the structure of the data varies depending on the handler.

Returns: mixed

getMetaData()

Returns detailed information about the specific item in the cache.

Parameter Name Type Description
$key string Cache

Returns: mixed

increment()

Performs atomic incrementation of a raw stored value.

Parameter Name Type Description
$key string Cache
$offset int Step/value

Returns: mixed

initialize()

Takes care of any handler-specific setup that must be done.

Returns:

isSupported()

Determines if the driver is supported on this system.

Returns: bool

save()

Saves an item to the cache store.

The $raw parameter is only utilized by Mamcache in order to allow usage of increment() and decrement().

Parameter Name Type Description
$key string Cache
$value data
$ttl null Time
$raw bool Whether
$value

Returns: mixed

Top