AdapterInterface
in
Cache adapter interface
Tags
Table of Contents
- clear() : void
- Clear all stored values from cache
- deleteItem() : void
- Delete a value in cache
- destroy() : void
- Destroy cache resource
- getItem() : mixed
- Get an item from cache
- getItemTtl() : int
- Get the time-to-live for an item in cache
- getTtl() : int
- Get the global time-to-live for the cache object
- hasItem() : bool
- Determine if the item exist in cache
- saveItem() : void
- Save an item to cache
- setTtl() : AdapterInterface
- Set the global time-to-live for the cache adapter
Methods
clear()
Clear all stored values from cache
public
clear() : void
Return values
void —deleteItem()
Delete a value in cache
public
deleteItem(string $id) : void
Parameters
- $id : string
Return values
void —destroy()
Destroy cache resource
public
destroy() : void
Return values
void —getItem()
Get an item from cache
public
getItem(string $id) : mixed
Parameters
- $id : string
Return values
mixed —getItemTtl()
Get the time-to-live for an item in cache
public
getItemTtl(string $id) : int
Parameters
- $id : string
Return values
int —getTtl()
Get the global time-to-live for the cache object
public
getTtl() : int
Return values
int —hasItem()
Determine if the item exist in cache
public
hasItem(string $id) : bool
Parameters
- $id : string
Return values
bool —saveItem()
Save an item to cache
public
saveItem(string $id, mixed $value[, int $ttl = null ]) : void
Parameters
- $id : string
- $value : mixed
- $ttl : int = null
Return values
void —setTtl()
Set the global time-to-live for the cache adapter
public
setTtl(int $ttl) : AdapterInterface
Parameters
- $ttl : int