Documentation

Apcu
in package

APC caching class.

Table of Contents

__construct()  : mixed
Class constructor.
clear()  : bool
Deletes all items in the cache.
delete()  : bool
Removes the item from the cache.
get()  : array<string|int, mixed>|string
Returns a cache item representing the specified key.
has()  : bool
Confirms if the cache contains specified cache item.
isSupported()  : bool
Is apcu is available.
save()  : array<string|int, mixed>|bool
Cache save.

Methods

__construct()

Class constructor.

public __construct() : mixed
Tags
throws
CacheException
Return values
mixed

clear()

Deletes all items in the cache.

public clear() : bool
Return values
bool

delete()

Removes the item from the cache.

public delete(array<string|int, mixed>|string $key) : bool
Parameters
$key : array<string|int, mixed>|string

Cache ID

Return values
bool

get()

Returns a cache item representing the specified key.

public get(array<string|int, mixed>|string $key) : array<string|int, mixed>|string
Parameters
$key : array<string|int, mixed>|string

Cache ID

Return values
array<string|int, mixed>|string

has()

Confirms if the cache contains specified cache item.

public has(array<string|int, mixed>|string $key) : bool
Parameters
$key : array<string|int, mixed>|string

Cache ID

Return values
bool

isSupported()

Is apcu is available.

public static isSupported() : bool
Return values
bool

save()

Cache save.

public save(string $key, array<string|int, mixed>|string $value, int $duration) : array<string|int, mixed>|bool
Parameters
$key : string

Cache ID

$value : array<string|int, mixed>|string

Data to store

$duration : int

Cache TTL (in seconds)

Return values
array<string|int, mixed>|bool

        

Search results