Menu

## ApcCache extends Cache
in package

ApcCache.php : 23

APC cache driver

This class provides a cache driver using the APC (Alternative PHP Cache) extension.

##### Tags

see
  https://www.kotchasan.com/

### Table of Contents

$cfg : object
  Config class instance.
$deferred : array<string|int, mixed>
  Deferred cache items
$request : Request
  Server request class instance.
__construct() : mixed
  Class constructor
clear() : bool
  Clear the cache
commit() : bool
  Commit the cached items in the deferred queue
deleteItem() : bool
  Delete a cache item
deleteItems() : bool
  Delete multiple cache items
getItem() : CacheItemInterface
  Get a cache item
getItems() : array<string|int, mixed>
  Get multiple cache items
hasItem() : bool
  Check if a cache item exists
save() : bool
  Save 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

#### __construct()

ApcCache.php : 30

Class constructor

`public __construct() : mixed`

##### Tags

throws
  Exception

  if APC is not supported

##### Return values

mixed —

#### clear()

ApcCache.php : 42

Clear the cache

`public clear() : bool`

##### Return values

bool —

true if successfully cleared, false otherwise

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

#### deleteItems()

ApcCache.php : 54

Delete multiple cache items

`public deleteItems(array<string|int, mixed> $keys) : bool`

##### Parameters

$keys : array<string|int, mixed>

##### Return values

bool —

true if successfully deleted, false otherwise

#### getItem()

Cache.php : 68

Get a cache item

`public getItem(string $key) : CacheItemInterface`

##### Parameters

$key : string

##### Return values

CacheItemInterface —

#### getItems()

ApcCache.php : 71

Get multiple cache items

`public getItems([array<string|int, mixed> $keys = [] ]) : array<string|int, mixed>`

##### Parameters

$keys : array<string|int, mixed> = []

##### Return values

array<string|int, mixed> —

#### hasItem()

ApcCache.php : 92

Check if a cache item exists

`public hasItem(string $key) : bool`

##### Parameters

$key : string

##### Return values

bool —

#### save()

ApcCache.php : 106

Save a cache item

`public save(CacheItemInterface $item) : bool`

##### Parameters

$item : CacheItemInterface

##### Tags

throws
  CacheException

##### Return values

bool —

true if successfully saved, false otherwise

#### saveDeferred()

Cache.php : 81

Save a cache item for deferred saving

`public saveDeferred(CacheItemInterface $item) : bool`

##### Parameters

$item : CacheItemInterface

##### Return values

bool —

## Search results