Issues

ZF-11607: Zend Translate not Caching with Memcache if object too large

Description

If I want to cache the Translations and my translations are larger than 1 MB Memcache Caching fails. This is normal because of the fact that Memcache only supports til 1 MB.

Zend_Translate should be realy checking if the Translation is in the cache and not only if it is active. (Zend_Cache test() function with the id).

<148 set Zend_Translate_fbb627815194a7eb92a9b65e6e71a1bb_Db 1 7200 16756097

148 SERVER_ERROR object too large for cache

$translate = Zend_Registry::get('Zend_Translate'); Zend_Debug::dump($translate); Zend_Debug::dump($translate->hasCache()); die();

My Output is "1" (does Cache exists), which is correct, but it implicates a status, that may not really exist.

Comments

When you add a cache then "hasCache" is always true regardless of stored or not stored content. The only thing which can be done and seems to be correct in such a case is to throw an exception. Because when a cache can not be written but you said store in cache its a severe problem.

Added in ZF2 with GH-295