Issues

ZF-10166: Zend_Translate should not clear all cache and use tagging when backend is capable of it

Description

I pass my cache object to Zend_Translate::setCache and when I call Zend_Translate::clearCache() it clears complete cache - no matter who worte it. problem is that one server is used by few projects and they all lose cache.

Could Zend_Translate and probably all other components (currency, locale data ... etc) that use cache, try to use tags if available in cache component.

I've extended Memcached backend so it supports cache tagging. So MyComp_Cache_Backend_Memcached::getCapabilities() return array with entry ('tags' => true) and I have implemented my way of handling tags.

Comments

selected component/s that concern this issue

It is not possible to add tagging because when a cache does not support tagging an notice/warning is thrown.

As long as Zend_Cache does not support tagging, or a proper handling for un-tagable cache adapters, it is not possible for the I18n core to support tagging.

Tags have been erased 3 releases before as there were problems with this approach.

Now, when using cache, Zend_Translate must have it's own cache or you omit using clearCache().

Thomas you can use getCapabilities() to determine whether the cache returns tags. If it does; it should use tags rather than clearing it all - imho.

There is no need to duplicate things which we already discussed and clearified.

You should give me some minutes to add a feature even if it's bug hunt day and I decleared that it works different that you noted within irc :-)

Added with r22586 See the manual for proper usage