\Pop\Cache\AdapterAbstractAdapter

Cache adapter abstract class

Summary

Methods
Properties
Constants
__construct()
setTtl()
getTtl()
getItemTtl()
saveItem()
getItem()
hasItem()
deleteItem()
clear()
destroy()
No public properties found
No constants found
No protected methods found
$ttl
N/A
No private methods found
No private properties found
N/A

Properties

$ttl

$ttl : integer

Global time-to-live

Type

integer

Methods

__construct()

__construct(integer  $ttl) 

Constructor

Instantiate the cache adapter object

Parameters

integer $ttl

setTtl()

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

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

Parameters

integer $ttl

Returns

\Pop\Cache\Adapter\AbstractAdapter

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