summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-10-04 20:42:42 +0200
committeradmin <devnull@localhost>2006-10-04 20:42:42 +0200
commitfa708175d3b3932e67af04858b841eb881c9579b (patch)
tree3fb1aeedea3afa7a97210adb6b494dfbd92fab4c /system
parent0c40565cbbf0218ad6927cbcbc80daf6aefc4377 (diff)
Diffstat (limited to 'system')
-rw-r--r--system/database/DB_driver.php23
1 files changed, 17 insertions, 6 deletions
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;