AbstractAdapter
Table of Contents
- $ttl : int
- Time to live.
- __construct() : mixed
- __construct.
- deleteItem() : self
- Delete a value in cache.
- destroy() : self
- Destroy cache resource.
- getItem() : mixed
- Get an item from cache.
- getItemTtl() : int|false
- Get the time-to-live for an item in cache.
- getTtl() : int
- Get the time-to-live for cache.
- hasItem() : bool
- Determine if the item exist in cache.
- saveItem() : self
- Save an item to cache.
- setTtl() : self
- Set the ttl.
Properties
$ttl
Time to live.
private
int
$ttl
= 0
Tags
Methods
__construct()
__construct.
public
__construct(int $ttl) : mixed
Parameters
- $ttl : int
-
time to live
Tags
Return values
mixed —deleteItem()
Delete a value in cache.
public
abstract deleteItem(string $key) : self
Parameters
- $key : string
Tags
Return values
self —destroy()
Destroy cache resource.
public
abstract destroy() : self
Tags
Return values
self —getItem()
Get an item from cache.
public
abstract getItem(string $key) : mixed
Parameters
- $key : string
Tags
Return values
mixed —getItemTtl()
Get the time-to-live for an item in cache.
public
abstract getItemTtl(string $key) : int|false
Parameters
- $key : string
Tags
Return values
int|false —getTtl()
Get the time-to-live for cache.
public
getTtl() : int
Tags
Return values
int —hasItem()
Determine if the item exist in cache.
public
abstract hasItem(string $key) : bool
Parameters
- $key : string
Tags
Return values
bool —saveItem()
Save an item to cache.
public
abstract saveItem(string $key, mixed $value[, int $ttl = null ]) : self
Parameters
- $key : string
- $value : mixed
- $ttl : int = null
Tags
Return values
self —setTtl()
Set the ttl.
public
setTtl(int $ttl) : self
Parameters
- $ttl : int
-
time to live