Orpheus

Cache

The interface to use to define a cache class.

Table of Contents

Methods

clear()  : bool
Reset the cache
clearAll()  : bool
Clear all
get()  : bool
Get the cache for the given parameters The type of the data should be preserved, even for objects.
getClass()  : string|null
Class of the cache
getHits()  : int|null
Get hit count.
getName()  : string
Name of the cache's class
getSize()  : int
Get size in bytes. 0 if none.
list()  : array<string|int, mixed>
List all
set()  : bool
Set the cache for the given parameters

Methods

clear()

Reset the cache

public clear() : bool
Return values
bool

True in case of success

clearAll()

Clear all

public static clearAll() : bool
Return values
bool

get()

Get the cache for the given parameters The type of the data should be preserved, even for objects.

public get(mixed &$cached) : bool
Parameters
$cached : mixed

The output to get the cache

Return values
bool

True if cache has been retrieved

getClass()

Class of the cache

public getClass() : string|null
Return values
string|null

getHits()

Get hit count.

public getHits() : int|null

Null if not supported

Return values
int|null

getName()

Name of the cache's class

public getName() : string
Return values
string

getSize()

Get size in bytes. 0 if none.

public getSize() : int
Return values
int

list()

List all

public static list() : array<string|int, mixed>
Return values
array<string|int, mixed>

set()

Set the cache for the given parameters

public set(mixed $data) : bool
Parameters
$data : mixed

The data to put in the cache

Return values
bool

True if cache has been saved


							
On this page

Search results