Expunge all cache instances in shutdown

pull/74/merge
Aleksander Machniak 12 years ago
parent 50abd55718
commit 00cb22cf92

@ -897,6 +897,9 @@ class rcube
foreach ($this->caches as $cache) {
if (is_object($cache)) {
if ($this->expunge_cache) {
$cache->expunge();
}
$cache->close();
}
}

@ -192,7 +192,7 @@ class rcube_cache
*/
function expunge()
{
if ($this->type == 'db' && $this->db) {
if ($this->type == 'db' && $this->db && $this->ttl) {
$this->db->query(
"DELETE FROM ".$this->db->table_name('cache').
" WHERE user_id = ?".

@ -191,7 +191,7 @@ class rcube_cache
*/
function expunge()
{
if ($this->type == 'db' && $this->db) {
if ($this->type == 'db' && $this->db && $this->ttl) {
$this->db->query(
"DELETE FROM " . $this->table
. " WHERE cache_key LIKE ?"

@ -3749,9 +3749,12 @@ class rcube_imap extends rcube_storage
$this->mcache->expunge($ttl);
}
/*
// this cache is expunged by rcube class
if ($this->cache) {
$this->cache->expunge();
}
*/
}

Loading…
Cancel
Save