\Pop\Cache\AdapterAdapterInterface

Cache adapter interface

Summary

Methods
Constants
setLifetime()
save()
load()
remove()
clear()
isExpired()
getStart()
getExpiration()
getLifetime()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

setLifetime()

setLifetime(integer  $lifetime) : \Pop\Cache\Adapter\AdapterInterface

Set the lifetime.

Parameters

integer $lifetime

Returns

\Pop\Cache\Adapter\AdapterInterface

save()

save(string  $id, mixed  $value) : void

Save a value to cache.

Parameters

string $id
mixed $value

load()

load(string  $id) : mixed

Load a value from cache.

Parameters

string $id

Returns

mixed

remove()

remove(string  $id) : void

Remove a value in cache.

Parameters

string $id

clear()

clear() : void

Clear all stored values from 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