ZF-7600: Zend_Cache_Core::getIdsMatchingTags

Issue Type: Bug Created: 2009-08-14T08:42:36.000+0000 Last Updated: 2010-03-02T02:29:34.000+0000 Status: Closed Fix version(s): - 1.10.3 (01/Apr/10)

Reporter: Michael Bagur (michael.bagur) Assignee: Marc Bennewitz (private) (mabe) Tags: - Zend_Cache

Related issues: Attachments:


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.


Posted by Michael Bagur (michael.bagur) on 2009-08-14T08:57:44.000+0000

I think I found the problem. in getIds() you have :


return $this->_backend->getIdsMatchingTags($tags);

line 448


  $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

Posted by Marc Bennewitz (private) (mabe) on 2010-03-02T02:29:33.000+0000

fixed in r21280 (trunk) and r21293 (1.10 branch)

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.