PHP Class CI_DB_Cache, TastyIgniter

Author: ExpressionEngine Dev Team
Datei anzeigen Open project: tastyigniter/tastyigniter Class Usage Examples

Public Properties

Property Type Description
$CI object CI Singleton
$db object Allows passing of DB object so that multiple database connections and returned DB objects can be supported.

Public Methods

Method Description
__construct ( &$db ) : void Constructor
check_path ( string $path = '' ) : boolean Set Cache Directory Path
delete ( string $segment_one = '', string $segment_two = '' ) : void Delete cache files within a particular directory
delete_all ( ) : void Delete all existing cache files
read ( string $sql ) : string Retrieve a cached query
write ( string $sql, object $object ) : boolean Write a query to a cache file

Method Details

__construct() public method

Constructor
public __construct ( &$db ) : void
return void

check_path() public method

Set Cache Directory Path
public check_path ( string $path = '' ) : boolean
$path string Path to the cache directory
return boolean

delete() public method

Delete cache files within a particular directory
public delete ( string $segment_one = '', string $segment_two = '' ) : void
$segment_one string
$segment_two string
return void

delete_all() public method

Delete all existing cache files
public delete_all ( ) : void
return void

read() public method

The URI being requested will become the name of the cache sub-folder. An MD5 hash of the SQL statement will become the cache file name.
public read ( string $sql ) : string
$sql string
return string

write() public method

Write a query to a cache file
public write ( string $sql, object $object ) : boolean
$sql string
$object object
return boolean

Property Details

$CI public_oe property

CI Singleton
public object $CI
return object

$db public_oe property

Allows passing of DB object so that multiple database connections and returned DB objects can be supported.
public object $db
return object