diff options
author | purwandi <free6300@gmail.com> | 2011-10-07 05:35:32 +0200 |
---|---|---|
committer | purwandi <free6300@gmail.com> | 2011-10-07 05:35:32 +0200 |
commit | 550b12dd981c6f7736a957392f6aaf28bdef98dd (patch) | |
tree | c01a5460d3b3ad2649aa0f63efa0cf9ada0106df /user_guide_src/source/database/caching.rst | |
parent | 15cec71083f3c3085b2e0d719496b195b7c48474 (diff) | |
parent | 02db0666a8b4da6a58db0e2f6755143ce1b21971 (diff) |
Merge branch 'develop' of https://github.com/EllisLab/CodeIgniter into develop
Diffstat (limited to 'user_guide_src/source/database/caching.rst')
-rw-r--r-- | user_guide_src/source/database/caching.rst | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/user_guide_src/source/database/caching.rst b/user_guide_src/source/database/caching.rst index 7a195a7a1..d73120a93 100644 --- a/user_guide_src/source/database/caching.rst +++ b/user_guide_src/source/database/caching.rst @@ -124,7 +124,17 @@ $this->db->cache_on() / $this->db->cache_off() Manually enables/disables caching. This can be useful if you want to keep certain queries from being cached. Example:: - // Turn caching on $this->db->cache_on(); $query = $this->db->query("SELECT * FROM mytable"); // Turn caching off for this one query $this->db->cache_off(); $query = $this->db->query("SELECT * FROM members WHERE member_id = '$current_user'"); // Turn caching back on $this->db->cache_on(); $query = $this->db->query("SELECT * FROM another_table"); + // Turn caching on + $this->db->cache_on(); + $query = $this->db->query("SELECT * FROM mytable"); + + // Turn caching off for this one query + $this->db->cache_off(); + $query = $this->db->query("SELECT * FROM members WHERE member_id = '$current_user'"); + + // Turn caching back on + $this->db->cache_on(); + $query = $this->db->query("SELECT * FROM another_table"); $this->db->cache_delete() ========================== |