summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/general/caching.rst
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-11-09 16:25:00 +0100
committerAndrey Andreev <narf@bofh.bg>2012-11-09 16:25:00 +0100
commit16a704ce8a1449cbee22fb13bd32508c975fac9f (patch)
tree524dbee290643a7dc762ddc505a0216bc871a6ef /user_guide_src/source/general/caching.rst
parent1bc30260d8bd35a958f3d7b899f68c95d69c9e75 (diff)
[ci skip] Polish docs in user_guide_src/source/general/
Diffstat (limited to 'user_guide_src/source/general/caching.rst')
-rw-r--r--user_guide_src/source/general/caching.rst30
1 files changed, 16 insertions, 14 deletions
diff --git a/user_guide_src/source/general/caching.rst b/user_guide_src/source/general/caching.rst
index bf6ed50f6..c40f652ac 100644
--- a/user_guide_src/source/general/caching.rst
+++ b/user_guide_src/source/general/caching.rst
@@ -23,36 +23,38 @@ will be retrieved and sent to the requesting user's browser. If it has
expired, it will be deleted and refreshed before being sent to the
browser.
-Note: The Benchmark tag is not cached so you can still view your page
-load speed when caching is enabled.
+.. note: The Benchmark tag is not cached so you can still view your page
+ load speed when caching is enabled.
Enabling Caching
================
To enable caching, put the following tag in any of your controller
-functions::
+methods::
- $this->output->cache(n);
+ $this->output->cache($n);
-Where n is the number of **minutes** you wish the page to remain cached
-between refreshes.
+Where ``$n`` is the number of **minutes** you wish the page to remain
+cached between refreshes.
-The above tag can go anywhere within a function. It is not affected by
+The above tag can go anywhere within a method. It is not affected by
the order that it appears, so place it wherever it seems most logical to
you. Once the tag is in place, your pages will begin being cached.
.. important:: Because of the way CodeIgniter stores content for output,
- caching will only work if you are generating display for your controller
- with a :doc:`view <./views>`.
+ caching will only work if you are generating display for your
+ controller with a :doc:`view <./views>`.
.. note:: Before the cache files can be written you must set the file
- permissions on your application/cache folder such that it is writable.
+ permissions on your *application/cache/* directory such that
+ it is writable.
Deleting Caches
===============
If you no longer wish to cache a file you can remove the caching tag and
-it will no longer be refreshed when it expires. Note: Removing the tag
-will not delete the cache immediately. It will have to expire normally.
-If you need to remove it earlier you will need to manually delete it
-from your cache folder.
+it will no longer be refreshed when it expires.
+
+.. note:: Removing the tag will not delete the cache immediately. It will
+ have to expire normally. If you need to remove it earlier you
+ will need to manually delete it from your cache directory. \ No newline at end of file