Expunge all cache instances in shutdown
| | |
| | | |
| | | foreach ($this->caches as $cache) { |
| | | if (is_object($cache)) { |
| | | if ($this->expunge_cache) { |
| | | $cache->expunge(); |
| | | } |
| | | $cache->close(); |
| | | } |
| | | } |
| | |
| | | */ |
| | | 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 = ?". |
| | |
| | | */ |
| | | 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 ?" |
| | |
| | | $this->mcache->expunge($ttl); |
| | | } |
| | | |
| | | /* |
| | | // this cache is expunged by rcube class |
| | | if ($this->cache) { |
| | | $this->cache->expunge(); |
| | | } |
| | | */ |
| | | } |
| | | |
| | | |