Ubiquity  2.0.3
php rapid development framework
DbCache Class Reference
+ Inheritance diagram for DbCache:

Public Member Functions

 __construct ()
 
 store ($tableName, $condition, $result)
 Caches the given data with the given key (tableName+md5(condition)). More...
 
 fetch ($tableName, $condition)
 Fetches data stored for the given condition in table. More...
 
 delete ($tableName, $condition)
 Deletes the entry corresponding to $condition apply to $table. More...
 
 clear ($matches="")
 
 remove ($key)
 
 setActive ($value=true)
 

Static Public Attributes

static $active =false
 

Protected Member Functions

 getKey ($query)
 

Protected Attributes

 $cache
 
 $config
 

Detailed Description

Definition at line 8 of file DbCache.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Definition at line 17 of file DbCache.php.

Member Function Documentation

◆ clear()

clear (   $matches = "")

Definition at line 46 of file DbCache.php.

◆ delete()

delete (   $tableName,
  $condition 
)
abstract

Deletes the entry corresponding to $condition apply to $table.

Parameters
string$tableName
string$condition
Returns
boolean true if the entry is deleted

◆ fetch()

fetch (   $tableName,
  $condition 
)
abstract

Fetches data stored for the given condition in table.

Parameters
string$tableName
string$condition
Returns
mixed the cached datas

◆ getKey()

getKey (   $query)
protected

Definition at line 13 of file DbCache.php.

◆ remove()

remove (   $key)

Definition at line 50 of file DbCache.php.

◆ setActive()

setActive (   $value = true)

Definition at line 54 of file DbCache.php.

◆ store()

store (   $tableName,
  $condition,
  $result 
)
abstract

Caches the given data with the given key (tableName+md5(condition)).

Parameters
string$tableName
string$condition
array$resultthe datas to store

Field Documentation

◆ $active

$active =false
static

Definition at line 11 of file DbCache.php.

◆ $cache

$cache
protected

Definition at line 9 of file DbCache.php.

◆ $config

$config
protected

Definition at line 10 of file DbCache.php.


The documentation for this class was generated from the following file: