diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2012-02-21 21:43:39 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2012-02-21 21:43:39 +0000 |
| commit | 13161d3135a52e80f01bf7923d711f2945649348 (patch) | |
| tree | 6c002c5ce6227e5eb2581f3be06577b267c617da /roundcubemail/program/include/main.inc | |
| parent | 333be7a2a0b9b10af7f2190c574b3f560b12b3ed (diff) | |
Refactored IMAP cache expunge: delegate to storage object; don't rely on deprecated 'enable_caching' config option
git-svn-id: https://svn.roundcube.net/trunk@5898 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/main.inc')
| -rw-r--r-- | roundcubemail/program/include/main.inc | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index 1e84e2dfb..68719e895 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/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) { |
