diff options
author | thomascube <thomas@roundcube.net> | 2012-02-21 21:43:39 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2012-02-21 21:43:39 +0000 |
commit | fec2d8e1309d1f16f9cd772b82b28627d9359354 (patch) | |
tree | 84a7d8d9276822535c6bfb2fd8429258df3436cf /program/include/main.inc | |
parent | 965e6276b3bf20545bcec46f87ef13ffadfac6c3 (diff) |
Refactored IMAP cache expunge: delegate to storage object; don't rely on deprecated 'enable_caching' config option
Diffstat (limited to 'program/include/main.inc')
-rw-r--r-- | program/include/main.inc | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/program/include/main.inc b/program/include/main.inc index 1e84e2dfb..68719e895 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -158,33 +158,6 @@ function rcmail_temp_gc() } -/** - * Garbage collector for cache entries. - * Remove all expired message cache records - * @return void - */ -function rcmail_cache_gc() -{ - $rcmail = rcmail::get_instance(); - $db = $rcmail->get_dbh(); - - // get target timestamp - $ts = get_offset_time($rcmail->config->get('message_cache_lifetime', '30d'), -1); - - $db->query("DELETE FROM ".get_table_name('cache_messages') - ." WHERE changed < " . $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)); -} - - // Deprecated function rcube_charset_convert($str, $from, $to=NULL) { |