Cache
extends KBase
in package
implements
CacheItemPoolInterface
Kotchasan Caching Class (base class)
This is an abstract base class that implements the PSR-16 CacheItemPoolInterface.
Tags
Interfaces, Classes and Traits
- CacheItemPoolInterface
- CacheItemPoolInterface generates CacheItemInterface objects.
Table of Contents
- $cfg : object
- Config class instance.
- $deferred : array<string|int, mixed>
- Deferred cache items
- $request : Request
- Server request class instance.
- commit() : bool
- Commit the cached items in the deferred queue
- deleteItem() : bool
- Delete a cache item
- getItem() : CacheItemInterface
- Get a cache item
- saveDeferred() : bool
- Save a cache item for deferred saving
Properties
$cfg
Config class instance.
protected
static object
$cfg
$deferred
Deferred cache items
protected
array<string|int, mixed>
$deferred
= []
$request
Server request class instance.
protected
static Request
$request
Methods
commit()
Commit the cached items in the deferred queue
public
commit() : bool
Return values
bool —deleteItem()
Delete a cache item
public
deleteItem(string $key) : bool
Parameters
- $key : string
Return values
bool —getItem()
Get a cache item
public
getItem(string $key) : CacheItemInterface
Parameters
- $key : string
Return values
CacheItemInterface —saveDeferred()
Save a cache item for deferred saving
public
saveDeferred(CacheItemInterface $item) : bool
Parameters
- $item : CacheItemInterface