\Pop\Cache\AdapterAdapterInterface

Cache adapter interface

Summary

Methods
Constants
setTtl()
getTtl()
getItemTtl()
saveItem()
getItem()
hasItem()
deleteItem()
clear()
destroy()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

setTtl()

setTtl(integer  $ttl) : \Pop\Cache\Adapter\AdapterInterface

Set the global time-to-live for the cache adapter

Parameters

integer $ttl

Returns

\Pop\Cache\Adapter\AdapterInterface

getTtl()

getTtl() : integer

Get the global time-to-live for the cache object

Returns

integer

getItemTtl()

getItemTtl(string  $id) : integer

Get the time-to-live for an item in cache

Parameters

string $id

Returns

integer

saveItem()

saveItem(string  $id, mixed  $value, integer  $ttl = null) : void

Save an item to cache

Parameters

string $id
mixed $value
integer $ttl

getItem()

getItem(string  $id) : mixed

Get an item from cache

Parameters

string $id

Returns

mixed

hasItem()

hasItem(string  $id) : boolean

Determine if the item exist in cache

Parameters

string $id

Returns

boolean

deleteItem()

deleteItem(string  $id) : void

Delete a value in cache

Parameters

string $id

clear()

clear() : void

Clear all stored values from cache

destroy()

destroy() : void

Destroy cache resource