Documentation

Base
in package

Base caching class.

Table of Contents

$cache  : mixed
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()  : bool
Cache save.

Properties

$cache

private static mixed $cache = []

Methods

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|null $value = null ][, false|int $duration = false ]) : bool
Parameters
$key : string

Cache ID

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

Data to store

$duration : false|int = false

Cache TTL (in seconds)

Return values
bool

        

Search results