ZF-9970: Zend_Cache_Frontend_Class need to switch _makeId to public in order to delete the cache object


New code: public function _makeId($name, $parameters) { return md5($this->_cachedEntityLabel . '' . $name . '' . serialize($parameters)); }

We can then invalidate with:

$cache = Zend_Cache::factory('Class','Memcached', $frontendOptions, $backendOptions); $cache->remove($cache->_makeId($method, $parms));

For database:

$query_cache = Zend_Cache::factory('Core','Memcached', $frontendOptions, $backendOptions); $query_cache->remove($name); // note: this does not need _makeId()


Can someone please change _makeId to public? or add a wrapper so we can get at the md5 value so we can invalidate for memcache?

fixed in r22642 (trunk) & r22643 (1.10 branch)

BC break, Does not have no opposition about applying it in mini release.

Case Break BC:

class ExtendFunction extends Zend_Cache_Frontend_(Function|Class)
    private function _makeId($callback, array $args)
        // my implementation

Keep the method private e makes called to method public. Correct also the called in the Zend_Cache_Frontend_(Function|Class):>call().

Sample code:

private function _makeId($callback, array $args)
    return $this->makeId($callback, $args);

Greetings Ramon

Hi Ramon - thanks for your comment.

I changed it in r22648 & r22649 (trunk) - If it's ok I merge it to the 1.10 branch. -> Additionally I changed the public method "makeId" to the following structure: "public function makeId($callback, array $args = array())"


fixed in r22654 (1.10 branch)