| | |
| | | | | |
| | | | This file is part of the Roundcube Webmail client | |
| | | | Copyright (C) 2005-2011, The Roundcube Dev Team | |
| | | | Licensed under the GNU GPL | |
| | | | | |
| | | | Licensed under the GNU General Public License version 3 or | |
| | | | any later version with exceptions for skins & plugins. | |
| | | | See the README file for a full license statement. | |
| | | | | |
| | | | PURPOSE: | |
| | | | Caching of IMAP folder contents (messages and index) | |
| | |
| | | |
| | | |
| | | /** |
| | | * Delete cache entries older than TTL |
| | | * |
| | | * @param string $ttl Lifetime of message cache entries |
| | | */ |
| | | function expunge($ttl) |
| | | { |
| | | // get expiration timestamp |
| | | $ts = get_offset_time($ttl, -1); |
| | | |
| | | $this->db->query("DELETE FROM ".get_table_name('cache_messages') |
| | | ." WHERE changed < " . $this->db->fromunixtime($ts)); |
| | | |
| | | $this->db->query("DELETE FROM ".get_table_name('cache_index') |
| | | ." WHERE changed < " . $this->db->fromunixtime($ts)); |
| | | |
| | | $this->db->query("DELETE FROM ".get_table_name('cache_thread') |
| | | ." WHERE changed < " . $this->db->fromunixtime($ts)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Fetches index data from database |
| | | */ |
| | | private function get_index_row($mailbox) |