ZF-10132: Set tags after $cache->start()

Description

Actually, Zend_Cache_Frontend_Page need to have tags set at creation. But generally, tags are determined after the call of $cache->start(). If there isn't some cache for current page, the program continues with the creation of the page. This is during this operation that tags are set.

So at the end of the porgram, we need to call something like that : $cache->setTags($array);

exemple of implementaion :


/**
 * Public frontend to set tags
 *
 * @param  array  $tags Array of tags
 * @return void
 */
public function setTags($tags)
{
    if (!is_array($tags)) {
        Zend_Cache::throwException('Invalid tags array : must be an array');
    }
    $this->_activeOptions['tags'] = $tags;
}

Comments

For this time, i also need to copy the file as a new one. The class couldn't be extended, because "$this->_activeOptions" is protected.