Cache implements Cache
Interfaces, Classes and Traits
Table of Contents
- $adapter : object
- Store the adapter object.
- __construct() : mixed
- __construct.
- clear() : self
- Clear all caches.
- delete() : self
- Delete item form cache.
- deleteMultiple() : self
- Delete multiples items form cache.
- get() : mixed
- Get the value from cache.
- getAdapter() : string
- Get the adapter of cache.
- getDefaultTtl() : int
- Get default ttl.
- getItemTtl() : int|false
- Get item ttl.
- getMultiple() : mixed
- Get the multiple values from cache.
- has() : bool
- Determine if cache exixts.
- set() : self
- Save item to cache.
- setMultiple() : self
- Save multiple items to cache.
- setProperAdapter() : self
- Set the valid adapter.
Properties
$adapter
Store the adapter object.
private
object
$adapter
= null
Tags
Methods
__construct()
__construct.
public
__construct([mixed $adapter = null ]) : mixed
Parameters
- $adapter : mixed = null
Tags
Return values
mixed —clear()
Clear all caches.
public
clear() : self
Tags
Return values
self —delete()
Delete item form cache.
public
delete(mixed $key) : self
Parameters
- $key : mixed
-
key for cache
Tags
Return values
self —deleteMultiple()
Delete multiples items form cache.
public
deleteMultiple(array<string|int, mixed> $keys) : self
Parameters
- $keys : array<string|int, mixed>
Tags
Return values
self —get()
Get the value from cache.
public
get(mixed $key[, mixed $default = null ]) : mixed
Parameters
- $key : mixed
- $default : mixed = null
Tags
Return values
mixed —getAdapter()
Get the adapter of cache.
public
getAdapter() : string
Tags
Return values
string —getDefaultTtl()
Get default ttl.
public
getDefaultTtl() : int
Tags
Return values
int —getItemTtl()
Get item ttl.
public
getItemTtl(string $key) : int|false
Parameters
- $key : string
Tags
Return values
int|false —getMultiple()
Get the multiple values from cache.
public
getMultiple(array<string|int, mixed> $keys[, mixed $default = null ]) : mixed
Parameters
- $keys : array<string|int, mixed>
- $default : mixed = null
Tags
Return values
mixed —has()
Determine if cache exixts.
public
has(mixed $key) : bool
Parameters
- $key : mixed
-
key for cache
Tags
Return values
bool —set()
Save item to cache.
public
set(mixed $key, mixed $value[, int $ttl = null ]) : self
Parameters
- $key : mixed
-
key for cache
- $value : mixed
-
value to be cached
- $ttl : int = null
-
time to live for cache
Tags
Return values
self —setMultiple()
Save multiple items to cache.
public
setMultiple(array<string|int, mixed> $cache) : self
Parameters
- $cache : array<string|int, mixed>
-
[key=>keyVal,value=> val,ttl=>ttl]
Tags
Return values
self —setProperAdapter()
Set the valid adapter.
public
setProperAdapter(string $adapter) : self
Parameters
- $adapter : string