-
Notifications
You must be signed in to change notification settings - Fork 0
CI_DB_Cache
Mathieu Nayrolles edited this page Jan 20, 2016
·
1 revision
Database Cache Class
- Class name: CI_DB_Cache
- Namespace:
public object $CI
CI Singleton
- Visibility: public
public object $db
Database object
Allows passing of DB object so that multiple database connections and returned DB objects can be supported.
- Visibility: public
void CI_DB_Cache::__construct($db)
Constructor
- Visibility: public
- $db mixed
boolean CI_DB_Cache::check_path(string $path)
Set Cache Directory Path
- Visibility: public
- $path string - <p>Path to the cache directory</p>
string CI_DB_Cache::read(string $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.
- Visibility: public
- $sql string
boolean CI_DB_Cache::write(string $sql, object $object)
Write a query to a cache file
- Visibility: public
- $sql string
- $object object
void CI_DB_Cache::delete(string $segment_one, string $segment_two)
Delete cache files within a particular directory
- Visibility: public
- $segment_one string
- $segment_two string
void CI_DB_Cache::delete_all()
Delete all existing cache files
- Visibility: public