Arikaim CMS

CacheInterface

Cache interface

Table of Contents

Methods

clear()  : bool
Delete all cache items.
delete()  : bool
Delete cache entry.
fetch()  : mixed|false
Fetch entry.
getStats()  : array<string|int, mixed>|null
Return cache stats
has()  : bool
Check if cache contains item
save()  : bool
Save data into the cache.

Methods

clear()

Delete all cache items.

public clear() : bool
Return values
bool

delete()

Delete cache entry.

public delete(string $id) : bool
Parameters
$id : string

cache id.

Return values
bool

fetch()

Fetch entry.

public fetch(string $id) : mixed|false
Parameters
$id : string
Return values
mixed|false

The cached data or false

getStats()

Return cache stats

public getStats() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

has()

Check if cache contains item

public has(string $id) : bool
Parameters
$id : string
Return values
bool

save()

Save data into the cache.

public save(string $id, mixed $data[, int $lifeTime = 0 ]) : bool
Parameters
$id : string

The cache id.

$data : mixed

The cache entry/data.

$lifeTime : int = 0

In minutes

Return values
bool

true if data was successfully stored in the cache, false otherwise.


        
On this page

Search results