\CI_DB_Cache

Database Cache Class

Summary

Methods
Properties
Constants
__construct()
check_path()
read()
write()
delete()
delete_all()
$CI
$db
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$CI

$CI : 

Type

$db

$db : 

Type

Methods

__construct()

__construct(  $db) 

Constructor

Grabs the CI super object instance so we can access it.

Parameters

$db

check_path()

check_path(  $path = '') : boolean

Set Cache Directory Path

Parameters

$path

Returns

boolean

read()

read(  $sql) : string

Retrieve a cached query

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

Parameters

$sql

Returns

string

write()

write(  $sql,   $object) : boolean

Write a query to a cache file

Parameters

$sql
$object

Returns

boolean

delete()

delete(  $segment_one = '',   $segment_two = '') : boolean

Delete cache files within a particular directory

Parameters

$segment_one
$segment_two

Returns

boolean

delete_all()

delete_all() : boolean

Delete all existing cache files

Returns

boolean