From fa708175d3b3932e67af04858b841eb881c9579b Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 4 Oct 2006 18:42:42 +0000 Subject: --- system/database/DB_driver.php | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'system/database') diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 24707aaca..39577ca83 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -902,6 +902,20 @@ class CI_DB_driver { { return $this->query_caching = FALSE; } + + // -------------------------------------------------------------------- + + /** + * Set Cache Directory Path + * + * @access public + * @param string the path to the cache directory + * @return void + */ + function cache_set_path($path = '') + { + $this->cachedir = $path; + } // -------------------------------------------------------------------- @@ -913,17 +927,14 @@ class CI_DB_driver { */ function _cache_init() { - if (is_object($this->cache)) + if (is_object($this->cache) AND class_exists('CI_DB_Cache')) { return TRUE; } - if ( ! class_exists('CI_DB_Cache')) + if ( ! @include_once(BASEPATH.'database/DB_cache'.EXT)) { - if ( ! @include_once(BASEPATH.'database/DB_cache'.EXT)) - { - return $this->cache_off(); - } + return $this->cache_off(); } $this->cache = new CI_DB_Cache; -- cgit v1.2.3-24-g4f1b