summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/database/caching.rst
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src/source/database/caching.rst')
-rw-r--r--user_guide_src/source/database/caching.rst12
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()
==========================