Thomas Bruederli
2013-10-21 f06aa8058b7e32ba32d4551074b6e0b8a300f751
program/include/rcube_cache.php
@@ -7,7 +7,10 @@
 | This file is part of the Roundcube Webmail client                     |
 | Copyright (C) 2011, The Roundcube Dev Team                            |
 | Copyright (C) 2011, Kolab Systems AG                                  |
 | 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 engine                                                      |
@@ -264,7 +267,7 @@
                $this->cache_sums[$key] = $md5sum;
                $this->cache[$key]      = $data;
            }
            else if (!$nostore) {
            else {
                $this->cache[$key] = null;
            }
        }
@@ -294,7 +297,7 @@
               $this->cache_sums[$key] = $md5sum;
                $this->cache_keys[$key] = $sql_arr['cache_id'];
            }
            else if (!$nostore) {
            else {
                $this->cache[$key] = null;
            }
        }
@@ -461,10 +464,13 @@
     */
    private function delete_record($key, $index=true)
    {
        if ($this->type == 'memcache')
            $this->db->delete($this->ckey($key));
        else
        if ($this->type == 'memcache') {
            // #1488592: use 2nd argument
            $this->db->delete($this->ckey($key), 0);
        }
        else {
            apc_delete($this->ckey($key));
        }
        if ($index) {
            if (($idx = array_search($key, $this->index)) !== false) {