summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-10-05 06:23:18 +0200
committeradmin <devnull@localhost>2006-10-05 06:23:18 +0200
commit5ffba1e7b3583ab5f3061fb77ae90fd1619af967 (patch)
tree89ccedf2b555db67f021f1c85bdaad5073d06fcd
parent44351bfc2a4dbd384bce7393cd76333885bf2c7f (diff)
-rw-r--r--user_guide/database/caching.html23
-rw-r--r--user_guide/general/changelog.html2
2 files changed, 17 insertions, 8 deletions
diff --git a/user_guide/database/caching.html b/user_guide/database/caching.html
index 73f5d9c90..02003b540 100644
--- a/user_guide/database/caching.html
+++ b/user_guide/database/caching.html
@@ -66,21 +66,30 @@ Database Caching Class
<p>The Database Caching Class contains functions that permit you to cache your queries.</p>
-<p class="important"><strong>Important:</strong>&nbsp; This class must be initialized independently since it is a separate class from the main Database class.
+<p class="important"><strong>Important:</strong>&nbsp; This class is initialized automatically by the database driver
+when caching is enabled, so you do NOT need to load this class manually.
More info below...</p>
+<h2>How Does Caching Work?</h2>
-<h2>Initializing the Caching Class</h2>
+<p>When caching is enabled, anytime you run a "read" type query (SELECT) the result object will
+be serialized and stored in a text file. Subsequent calls to that query will use the result from the cache file
+rather then accessing your database.</p>
-<p>To initialize this class please use the following code:</p>
+<p>Code Igniter places your cached queries into sub-folders that are named based on the URI request. This allows
+identical queries
-<code>$this->load->dbcache()</code>
-<p>You can also autoload this class from within your <dfn>config/autoload.php</dfn> file by specifying <kbd>dbcache</kbd> in the <samp>$autoload['libraries']</samp> array.</p>
+<p>If you run a "write" type query (INSERT, UPDATE, etc.)
-<p>Once initialized you will access the functions using the <dfn>$this->dbutil</dfn> object:</p>
+<p>Although caching queries reduces your database load, cached queries do require more
+file-system operations, as cache files are created and read. Instead of accessing your database for information
+text files are used.
-<code>$this->dbcache->some_function()</code>
+Whether you see a performance gain as a result of caching is dependant on many factors.
+For example, if you have a highly optimized database under very little load, you probably won't see a performance boost.
+If your database is under heavy use you probably will see an improved response, assuming your filesystem is not
+overly taxed.</p>
diff --git a/user_guide/general/changelog.html b/user_guide/general/changelog.html
index 3351cc130..1e7b32213 100644
--- a/user_guide/general/changelog.html
+++ b/user_guide/general/changelog.html
@@ -68,7 +68,7 @@ Change Log
<ul>
<li>Added <a href="../database/utilities.html">DB utility class</a>, permitting DB backups, CVS or XML files from DB results, and various other functions.</li>
-<li>Added <a href="../database/caching.html">Query Caching</a> to database class.</li>
+<li>Added <a href="../database/caching.html">Database Caching Class</a>.</li>
<li>Added <a href="../database/transactions.html">transaction support</a> to the database classes.</li>
<li>Added relationship capability to the database active record class</li>
<li>Added <a href="../general/profiling.html">Profiler Class</a> which generates a report of Benchmark execution times, queries, and POST data at the bottom of your pages.</li>