\Pop\CacheCache

Cache class

Summary

Methods
Properties
Constants
__construct()
getAvailableAdapters()
isAvailable()
setAdapter()
getAdapter()
adapter()
save()
load()
remove()
clear()
isExpired()
getStart()
getExpiration()
getLifetime()
No public properties found
No constants found
No protected methods found
$adapter
N/A
No private methods found
No private properties found
N/A

Properties

Methods

getAvailableAdapters()

getAvailableAdapters() : array

Determine available adapters

Returns

array

isAvailable()

isAvailable(string  $adapter) : boolean

Determine if an adapter is available

Parameters

string $adapter

Returns

boolean

getAdapter()

getAdapter() : mixed

Get the adapter

Returns

mixed

adapter()

adapter() : mixed

Get the adapter (alias method)

Returns

mixed

save()

save(string  $id, mixed  $value) : \Pop\Cache\Cache

Save a value to cache.

Parameters

string $id
mixed $value

Returns

\Pop\Cache\Cache

load()

load(string  $id) : mixed

Load a value from cache.

Parameters

string $id

Returns

mixed

remove()

remove(string  $id) : \Pop\Cache\Cache

Remove a value in cache.

Parameters

string $id

Returns

\Pop\Cache\Cache

clear()

clear(boolean  $del = false) : \Pop\Cache\Cache

Clear all stored values from cache.

Parameters

boolean $del

Returns

\Pop\Cache\Cache

isExpired()

isExpired(string  $id) : boolean

Tell is a value is expired.

Parameters

string $id

Returns

boolean

getStart()

getStart(string  $id) : integer

Get original start timestamp of the value.

Parameters

string $id

Returns

integer

getExpiration()

getExpiration(string  $id) : integer

Get expiration timestamp of the value.

Parameters

string $id

Returns

integer

getLifetime()

getLifetime(string  $id) : integer

Get the lifetime of the value.

Parameters

string $id

Returns

integer