summaryrefslogtreecommitdiffstats
path: root/system/database/DB_cache.php
diff options
context:
space:
mode:
authorJonathon Hill <jhill@brandmovers.com>2012-11-12 14:51:41 +0100
committerJonathon Hill <jhill@brandmovers.com>2012-11-12 14:51:41 +0100
commit3978fc33d82dd7f778d1adbf30744f4dfac41c25 (patch)
treef32be1ae610f0cfeff65c35abecd14e8ea5cadc6 /system/database/DB_cache.php
parent275cf274860c6ed181d50b398efd3a21d7ba9135 (diff)
parenta9ab46d7a031bda304eb9b6658ffaf693b8d9bcb (diff)
Merge remote-tracking branch 'upstream/develop' into develop
Conflicts: user_guide_src/source/changelog.rst Signed-off-by: Jonathon Hill <jhill@brandmovers.com>
Diffstat (limited to 'system/database/DB_cache.php')
-rw-r--r--system/database/DB_cache.php31
1 files changed, 24 insertions, 7 deletions
diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php
index d07c755c6..1be80c5c7 100644
--- a/system/database/DB_cache.php
+++ b/system/database/DB_cache.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php
/**
* CodeIgniter
*
@@ -24,6 +24,7 @@
* @since Version 1.0
* @filesource
*/
+defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Database Cache Class
@@ -34,8 +35,24 @@
*/
class CI_DB_Cache {
+ /**
+ * CI Singleton
+ *
+ * @var object
+ */
public $CI;
- public $db; // allows passing of db object so that multiple database connections and returned db objects can be supported
+
+ /**
+ * Database object
+ *
+ * Allows passing of DB object so that multiple database connections
+ * and returned DB objects can be supported.
+ *
+ * @var object
+ */
+ public $db;
+
+ // --------------------------------------------------------------------
/**
* Constructor
@@ -58,7 +75,7 @@ class CI_DB_Cache {
/**
* Set Cache Directory Path
*
- * @param string the path to the cache directory
+ * @param string $path Path to the cache directory
* @return bool
*/
public function check_path($path = '')
@@ -94,7 +111,7 @@ class CI_DB_Cache {
* 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
+ * An MD5 hash of the SQL statement will become the cache file name.
*
* @param string $sql
* @return string
@@ -153,8 +170,8 @@ class CI_DB_Cache {
/**
* Delete cache files within a particular directory
*
- * @param string $segment_one = ''
- * @param string $segment_two = ''
+ * @param string $segment_one
+ * @param string $segment_two
* @return void
*/
public function delete($segment_one = '', $segment_two = '')
@@ -182,7 +199,7 @@ class CI_DB_Cache {
*/
public function delete_all()
{
- delete_files($this->db->cachedir, TRUE, 0, TRUE);
+ delete_files($this->db->cachedir, TRUE, TRUE);
}
}