Menu

## Cache extends KBase
in package
implements CacheItemPoolInterface

Cache.php : 24

Kotchasan Caching Class (base class)

This is an abstract base class that implements the PSR-16 CacheItemPoolInterface.

##### Tags

see
  https://www.kotchasan.com/

### 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

KBase.php : 26

Config class instance.

`protected static object $cfg`

#### $deferred

Cache.php : 31

Deferred cache items

`protected array<string|int, mixed> $deferred = []`

#### $request

KBase.php : 33

Server request class instance.

`protected static Request $request`

### Methods

#### commit()

Cache.php : 38

Commit the cached items in the deferred queue

`public commit() : bool`

##### Return values

bool —

#### deleteItem()

Cache.php : 56

Delete a cache item

`public deleteItem(string $key) : bool`

##### Parameters

$key : string

##### Return values

bool —

#### getItem()

Cache.php : 68

Get a cache item

`public getItem(string $key) : CacheItemInterface`

##### Parameters

$key : string

##### Return values

CacheItemInterface —

#### saveDeferred()

Cache.php : 81

Save a cache item for deferred saving

`public saveDeferred(CacheItemInterface $item) : bool`

##### Parameters

$item : CacheItemInterface

##### Return values

bool —

## Search results