From fec2d8e1309d1f16f9cd772b82b28627d9359354 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Tue, 21 Feb 2012 16:43:39 -0500
Subject: [PATCH] Refactored IMAP cache expunge: delegate to storage object; don't rely on deprecated 'enable_caching' config option

---
 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 1e84e2d..68719e8 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -158,33 +158,6 @@
 }
 
 
-/**
- * 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)
 {

--
Gitblit v1.9.1