jICacheDriver

Extends

Interface for cache drivers

package

jelix

subpackage

cache

Methods

constructor

__construct(array $params) 

Arguments

$params

array

driver parameters, written in the ini file

decrement a specific data value by $decvalue

decrement(string $key, mixed $decvalue = 1) 

Arguments

$key

string

key used for storing data in the cache

$decvalue

mixed

value used to decrement

delete a specific data in the cache

delete(string $key) 

Arguments

$key

string

key used for storing data in the cache

clear data in the cache

flush() 

remove from the cache data of which TTL was expired

garbage() 

read a specific data in the cache.

get(mixed $key) : mixed

Arguments

$key

mixed

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

Response

mixed

the value or false if failure

increment a specific data value by $incvalue

increment(string $key, mixed $incvalue = 1) 

Arguments

$key

string

key used for storing data in the cache

$incvalue

mixed

value used to increment

replace a specific data value by $var

replace(string $key, mixed $value, mixed $ttl) 

Arguments

$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

write a specific data in the cache.

set(string $key, mixed $value, mixed $ttl) 

Arguments

$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