summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-03-25 19:09:56 +0000
committerthomascube <thomas@roundcube.net>2008-03-25 19:09:56 +0000
commit780527b4c01131d08cbf86c0620ec8fe8e4afe6e (patch)
tree312262101deb99f777c75c1b32ff4a27992ecca1 /program
parentac26b964663405521077c7710212a58c37a041c7 (diff)
Don't execute SQL queries if caching is disabled
Diffstat (limited to 'program')
-rw-r--r--program/include/rcube_imap.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc
index 5b3efb80f..909af8de1 100644
--- a/program/include/rcube_imap.inc
+++ b/program/include/rcube_imap.inc
@@ -2228,6 +2228,9 @@ class rcube_imap
*/
function remove_message_cache($key, $index)
{
+ if (!$this->caching_enabled)
+ return;
+
$this->db->query(
"DELETE FROM ".get_table_name('messages')."
WHERE user_id=?
@@ -2243,6 +2246,9 @@ class rcube_imap
*/
function clear_message_cache($key, $start_index=1)
{
+ if (!$this->caching_enabled)
+ return;
+
$this->db->query(
"DELETE FROM ".get_table_name('messages')."
WHERE user_id=?