From 11c06c76e7a166228ef045c4d13c196bf964bd63 Mon Sep 17 00:00:00 2001
From: admin The Database Caching Class contains functions that permit you to cache your queries. Important: This class is initialized automatically by the database driver
-when caching is enabled, so you do NOT need to load this class manually.
+when caching is enabled. Do NOT load this class manually.
More info below... 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. When caching is enabled, anytime a "read" type query (SELECT) is run, the result object will
+be serialized and stored in a text file on your server. Subsequent calls to that query will use the result from the cache file
+rather then accessing your database. In other words, the first time a page is loaded a cache file will be written.
+The next time the page is loaded the cached file will be used. Code Igniter places your cached queries into sub-folders that are named based on the URI request. This allows
-identical queries
+ When a "write" type query (INSERT, UPDATE, etc.) is run , any cache files associated with the particular page being viewed
+will be deleted automatically. In some cases you may need to update some data with every page load (user stats, for example).
+In these cases you'll proabably want to manually disable caching just before running your "write" query, then re-enable it just
+after. Otherwise, your site will be caught ina cycle of writing/deleting caches, creating more load then if you were not using
+caching. More information on this will be found below. If you run a "write" type query (INSERT, UPDATE, etc.)
+ Although caching will reduce your database load, dealing with cache files does generate more
+up-front processing and file-system operations, as cache files are created and read. Instead of accessing your database for information
+text files are used. 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.
-
-Whether you see a performance gain as a result of caching is dependant on many factors.
+ 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.How Does Caching Work?
-
Enabling caching requires three steps:
+