PHP Class dbCacheDriver

Inheritance: implements jICacheDriver
Afficher le fichier Open project: jelix/jelix

Méthodes publiques

Свойство Type Description
$automatic_cleaning_factor integer automatic cleaning process 0 means disabled, 1 means systematic cache cleaning of expired data (at each set or add call), greater values mean less frequent cleaning
$enabled boolean active cache ?
$profil_name string profil name used in the ini file
$ttl boolean TTL used

Protected Properties

Свойство Type Description
$_dao string name of the table mapping.
$_dbprofile string connexion dbprofile
$base64encoding for some sqlite version, it seems it doesn't support very well result of php serialization. This flags indicates to encode values before storing them

Méthodes publiques

Méthode Description
__construct ( $params )
decrement ( string $key, mixed $var = 1 ) : boolean decrement a specific data value by $var
delete ( string $key ) : boolean delete a specific data in the cache
flush ( ) : boolean clear all data in the cache
garbage ( ) : boolean remove from the cache data of which TTL was expired
get ( mixed $key ) : mixed read a specific data in the cache.
increment ( string $key, mixed $var = 1 ) : boolean increment a specific data value by $var
replace ( string $key, mixed $var, integer $ttl ) : boolean replace a specific data value by $var
set ( string $key, mixed $var, integer $ttl ) : boolean set a specific data in the cache

Method Details

__construct() public méthode

public __construct ( $params )

decrement() public méthode

decrement a specific data value by $var
public decrement ( string $key, mixed $var = 1 ) : boolean
$key string key used for storing data in the cache
$var mixed value used
Résultat boolean false if failure

delete() public méthode

delete a specific data in the cache
public delete ( string $key ) : boolean
$key string key used for storing data in the cache
Résultat boolean false if failure

flush() public méthode

clear all data in the cache
public flush ( ) : boolean
Résultat boolean false if failure

garbage() public méthode

remove from the cache data of which TTL was expired
public garbage ( ) : boolean
Résultat boolean false if failure

get() public méthode

read a specific data in the cache.
public get ( mixed $key ) : mixed
$key mixed key or array of keys used for storing data in the cache
Résultat mixed $data data or false if failure

increment() public méthode

increment a specific data value by $var
public increment ( string $key, mixed $var = 1 ) : boolean
$key string key used for storing data in the cache
$var mixed value used
Résultat boolean false if failure

replace() public méthode

replace a specific data value by $var
public replace ( string $key, mixed $var, integer $ttl ) : boolean
$key string key used for storing data in the cache
$var mixed data to replace
$ttl integer data time expiration
Résultat boolean false if failure

set() public méthode

set a specific data in the cache
public set ( string $key, mixed $var, integer $ttl ) : boolean
$key string key used for storing data
$var mixed data to store
$ttl integer data time expiration. -1 means no change
Résultat boolean false if failure

Property Details

$_dao protected_oe property

name of the table mapping.
protected string $_dao
Résultat string

$_dbprofile protected_oe property

connexion dbprofile
protected string $_dbprofile
Résultat string

$automatic_cleaning_factor public_oe property

automatic cleaning process 0 means disabled, 1 means systematic cache cleaning of expired data (at each set or add call), greater values mean less frequent cleaning
public int $automatic_cleaning_factor
Résultat integer

$base64encoding protected_oe property

for some sqlite version, it seems it doesn't support very well result of php serialization. This flags indicates to encode values before storing them
protected $base64encoding

$enabled public_oe property

active cache ?
public bool $enabled
Résultat boolean

$profil_name public_oe property

profil name used in the ini file
public string $profil_name
Résultat string

$ttl public_oe property

TTL used
public bool $ttl
Résultat boolean