ZF-9850: Stop caching $_options in zend_translate to avoid warning of "Potential cache slam averted for key "
At present, Zend_Translate adapter is caching $_options parameter. I do not see any performance improvement of this feature but it does lead to bunch of "Potential cache slam averted for key " with apc cache options.
Consider following scenario:
Zend_translate is passed in an option to log missing translations to a file on the server. Zend_translate is set up in the beginning for all incoming requests and put in the registry so that views can later access them. Apc is used as caching for zend_translate.
Since parameter for log is created each time, zend_translate adapter thinks the options value have changed and try to save it in the cache with the same key. Since, there are several requests in the same second, Apc does not save the cache and throws the warning of "Potential cache slam averted for key Zend_Translate_TMX_Options.
I have tried to cache $log in the cache so that zend_translate does not think its changed but that does not work as the $writer object has stream to a file which does not work with cache.
In my opinion, there are no advantages of caching $options parameter as they are already in memory before they are passed within zend_translate.