My Project
 All Data Structures Namespaces Functions Variables
Public Member Functions | Data Fields
CI_DB_Cache Class Reference

Public Member Functions

 __construct (&$db)
 
 check_path ($path= '')
 
 read ($sql)
 
 write ($sql, $object)
 
 delete ($segment_one= '', $segment_two= '')
 
 delete_all ()
 

Data Fields

 $CI
 
 $db
 

Constructor & Destructor Documentation

__construct ( $db)

Constructor

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

Member Function Documentation

check_path (   $path = '')

Set Cache Directory Path

public

Parameters
stringthe path to the cache directory
Returns
bool
delete (   $segment_one = '',
  $segment_two = '' 
)

Delete cache files within a particular directory

public

Returns
bool
delete_all ( )

Delete all existing cache files

public

Returns
bool
read (   $sql)

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

public

Returns
string
write (   $sql,
  $object 
)

Write a query to a cache file

public

Returns
bool

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