summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/main.inc
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-09-07 11:07:03 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-09-07 11:07:03 +0000
commitf973722de683aaa549c9114546281f597c4ee61d (patch)
treefdf4254db973633138d81bd6038957d2c5299ee2 /roundcubemail/program/include/main.inc
parentf30ce4fdf2ac950ffc78dfec1cb36e173a087cc0 (diff)
- Rewritten messages caching (merged devel-mcache branch):
Indexes are stored in a separate table, so there's no need to store all messages in a folder Added threads data caching Flags are stored separately, so flag change doesn't cause DELETE+INSERT, just UPDATE - Partial QRESYNC support - Improved FETCH response handling - Improvements in response tokenization method git-svn-id: https://svn.roundcube.net/trunk@5190 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/main.inc')
-rw-r--r--roundcubemail/program/include/main.inc14
1 files changed, 10 insertions, 4 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc
index 4c24ce31e..3513a07c2 100644
--- a/roundcubemail/program/include/main.inc
+++ b/roundcubemail/program/include/main.inc
@@ -169,11 +169,17 @@ function rcmail_cache_gc()
// get target timestamp
$ts = get_offset_time($rcmail->config->get('message_cache_lifetime', '30d'), -1);
- $db->query("DELETE FROM ".get_table_name('messages')."
- WHERE created < " . $db->fromunixtime($ts));
+ $db->query("DELETE FROM ".get_table_name('cache_messages')
+ ." WHERE changed < " . $db->fromunixtime($ts));
- $db->query("DELETE FROM ".get_table_name('cache')."
- WHERE created < " . $db->fromunixtime($ts));
+ $db->query("DELETE FROM ".get_table_name('cache_index')
+ ." WHERE changed < " . $db->fromunixtime($ts));
+
+ $db->query("DELETE FROM ".get_table_name('cache_thread')
+ ." WHERE changed < " . $db->fromunixtime($ts));
+
+ $db->query("DELETE FROM ".get_table_name('cache')
+ ." WHERE created < " . $db->fromunixtime($ts));
}