Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.9.1
-
Fix Version/s: 1.10.3
-
Component/s: Zend_Cache
-
Labels:None
Description
when I call getIds() on my Cache Object I get the right ids but when I call getIdsMatchingTags , it gives me the ids prefixed by the 'namespace' I have to strip it manually because load() on those ids do not load the right cache data.
I think I found the problem. in getIds() you have :
replacing
return $this->_backend->getIdsMatchingTags($tags);
line 448
by
$array = $this->_backend->getIdsMatchingTags($tags);
if ((!isset($this->_options['cache_id_prefix'])) || ($this->_options['cache_id_prefix'] == '')) return $array;
// we need to remove cache_id_prefix from ids (see #
ZF-6178)$res = array();
while (list(,$id) = each($array)) {
if (strpos($id, $this->_options['cache_id_prefix']) === 0) {
$res[] = preg_replace("~^{$this->_options['cache_id_prefix']}~", '', $id);
} else { $res[] = $id; }
}
return $res;
should work (see see #
ZF-6178)and same thing goes with getIdsNotMatchingTags
ZF-6178) $res = array(); while (list(,$id) = each($array)) { if (strpos($id, $this->_options['cache_id_prefix']) === 0) { $res[] = preg_replace("~^{$this->_options['cache_id_prefix']}~", '', $id); } else { $res[] = $id; } } return $res; should work (see see #ZF-6178) and same thing goes with getIdsNotMatchingTags