Jelix 1.8.14-pre

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

Tags
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

Tags
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

Tags
Return values
mixed

flush()

clear data in the cache.

public flush() : mixed
Tags
Return values
mixed

garbage()

remove from the cache data of which TTL was expired.

public garbage() : mixed
Tags
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

Tags
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

Tags
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

Tags
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

Tags
Return values
mixed

Search results