Jelix 1.6.40

jICacheDriver

Interface for cache drivers

Tags
subpackage

cache

Table of Contents

__construct()  : mixed
constructor
decrement()  : mixed
decrement a specific data value by $decvalue
delete()  : mixed
delete a specific data in the cache
flush()  : mixed
clear data in the cache
garbage()  : mixed
remove from the cache data of which TTL was expired
get()  : mixed
read a specific data in the cache.
increment()  : mixed
increment a specific data value by $incvalue
replace()  : mixed
replace a specific data value by $var
set()  : mixed
write a specific data in the cache.

Methods

__construct()

constructor

public __construct(array<string|int, mixed> $params) : mixed
Parameters
$params : array<string|int, mixed>

driver parameters, written in the ini file

Return values
mixed

decrement()

decrement a specific data value by $decvalue

public decrement(string $key[, mixed $decvalue = 1 ]) : mixed
Parameters
$key : string

key used for storing data in the cache

$decvalue : mixed = 1

value used to decrement

Return values
mixed

delete()

delete a specific data in the cache

public delete(string $key) : mixed
Parameters
$key : string

key used for storing data in the cache

Return values
mixed

flush()

clear data in the cache

public flush() : mixed
Return values
mixed

garbage()

remove from the cache data of which TTL was expired

public garbage() : mixed
Return values
mixed

get()

read a specific data in the cache.

public get(mixed $key) : mixed
Parameters
$key : mixed

key or array of keys used for storing data in the cache

Return values
mixed

the value or false if failure

increment()

increment a specific data value by $incvalue

public increment(string $key[, mixed $incvalue = 1 ]) : mixed
Parameters
$key : string

key used for storing data in the cache

$incvalue : mixed = 1

value used to increment

Return values
mixed

replace()

replace a specific data value by $var

public replace(string $key, mixed $value, mixed $ttl) : mixed
Parameters
$key : string

key used for storing data in the cache

$value : mixed

data to replace

$ttl : mixed

data time expiration. 0 means no expire, use a timestamp UNIX or a delay in secondes which mustn't exceed 30 days i.e 2592000s or a string in date format US

Return values
mixed

set()

write a specific data in the cache.

public set(string $key, mixed $value, mixed $ttl) : mixed
Parameters
$key : string

key used for storing data in the cache

$value : mixed

data to store

$ttl : mixed

data time expiration. 0 means no expire, use a timestamp UNIX or a delay in secondes which mustn't exceed 30 days i.e 2592000s or a string in date format US

Return values
mixed

Search results