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

Issue Type: Improvement Created: 2010-07-16T02:19:19.000+0000 Last Updated: 2010-07-16T13:13:26.000+0000 Status: Resolved Fix version(s): - 1.10.7 (28/Jul/10)

Reporter: Zoran Lazic (zoki) Assignee: Thomas Weidner (thomas) Tags: - Zend_Translate

Related issues: Attachments:


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.


Posted by Zoran Lazic (zoki) on 2010-07-16T02:20:15.000+0000

selected component/s that concern this issue

Posted by Thomas Weidner (thomas) on 2010-07-16T10:06:34.000+0000

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().

Posted by Dolf Schimmel (Freeaqingme) (freak) on 2010-07-16T10:32:52.000+0000

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.

Posted by Thomas Weidner (thomas) on 2010-07-16T11:40:24.000+0000

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 :-)

Posted by Thomas Weidner (thomas) on 2010-07-16T13:13:26.000+0000

Added with r22586 See the manual for proper usage

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.