Aleksander Machniak
2015-05-11 247b845a8e0813050c6d0e0c9d3f06df13c71d07
Workaround possible issue where some keys were ignored when deleting cached entries
by key name prefix and keys index is in inconsistent state (does not contain all keys)
1 files modified
8 ■■■■ changed files
program/lib/Roundcube/rcube_cache.php 8 ●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_cache.php
@@ -418,7 +418,13 @@
            }
            // Remove keys by name prefix
            else if ($prefix_mode) {
                foreach ($this->index as $k) {
                // handle data inconsistency: it may happen that index
                // contains not all existing cache entries, here we could
                // handle at least these that were used before the index was read
                $index = array_merge($this->index, array_keys($this->cache));
                $index = array_unique($index);
                foreach ($index as $k) {
                    if (strpos($k, $key) === 0) {
                        $this->delete_record($k);
                    }