Kotchasan

ApcCache extends Cache
in package

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

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

__construct()

Class constructor

public __construct() : mixed
Tags
throws
Exception

if APC is not supported

Return values
mixed

clear()

Clear the cache

public clear() : bool
Return values
bool

true if successfully cleared, false otherwise

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

deleteItems()

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

getItems()

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()

Check if a cache item exists

public hasItem(string $key) : bool
Parameters
$key : string
Return values
bool

Search results