PHP Класс dbCacheDriver

Наследование: implements jICacheDriver
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$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)

Свойство Тип Описание
$_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

Открытые методы

Метод Описание
__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

Описание методов

__construct() публичный Метод

public __construct ( $params )

decrement() публичный Метод

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
Результат boolean false if failure

delete() публичный Метод

delete a specific data in the cache
public delete ( string $key ) : boolean
$key string key used for storing data in the cache
Результат boolean false if failure

flush() публичный Метод

clear all data in the cache
public flush ( ) : boolean
Результат boolean false if failure

garbage() публичный Метод

remove from the cache data of which TTL was expired
public garbage ( ) : boolean
Результат boolean false if failure

get() публичный Метод

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
Результат mixed $data data or false if failure

increment() публичный Метод

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
Результат boolean false if failure

replace() публичный Метод

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
Результат boolean false if failure

set() публичный Метод

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
Результат boolean false if failure

Описание свойств

$_dao защищенное свойство

name of the table mapping.
protected string $_dao
Результат string

$_dbprofile защищенное свойство

connexion dbprofile
protected string $_dbprofile
Результат string

$automatic_cleaning_factor публичное свойство

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
Результат integer

$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
protected $base64encoding

$enabled публичное свойство

active cache ?
public bool $enabled
Результат boolean

$profil_name публичное свойство

profil name used in the ini file
public string $profil_name
Результат string

$ttl публичное свойство

TTL used
public bool $ttl
Результат boolean