ZF-2178: Zend_Cache utilization within other Zend Framework components

Issue Type: Improvement Created: 2007-11-09T16:54:09.000+0000 Last Updated: 2012-11-20T21:37:53.000+0000 Status: Open Fix version(s): Reporter: Wil Sinclair (wil) Assignee: None Tags: - Zend_Cache

Related issues: Attachments:


Define an infrastucture and/or coding standard for utilizing Zend_Cache within other ZF components. The best backend available should be automatically chosen to make optimal Zend_Cache utilization relatively transparent. On the other hand, the backend should be configurable for each instance of use.


Posted by Wil Sinclair (wil) on 2008-04-18T13:11:48.000+0000

This doesn't appear to have been fixed in 1.5.0. Please update if this is not correct.

Posted by Wil Sinclair (wil) on 2008-06-09T13:08:04.000+0000

Stas, I believe you were looking in to this. Do you have a proposal? Is it something we'd want to do in one of the upcoming minor releases?

Posted by old of Satoru Yoshida ( on 2009-04-03T16:39:40.000+0000

set component

Posted by Aleksi Ursin (aleksiu) on 2009-06-11T03:32:05.000+0000

Quickly thinking check if registry has "Zend_Cache" or "Zend_Cache_Transparent" and use that, and have methods for replacing the engine if needed to, ie. $object->setCacheEngine(obj Zend_Cache)

Easy and transparent.

Keys: a prefix, object name, method name, method call variables, potentially aswell (some) object variables. and have a method to change the prefix.

registry "Zend_Cache_Transparent" could be used to give more feasible option to set a separate engine for the transparent caching portions.

Most of the work ofc is in the other ZF components to actually implement this.

Posted by Satoru Yoshida (satoruyoshida) on 2009-12-02T06:38:35.000+0000

I found it as unassigned.

Posted by Marc Bennewitz (private) (mabe) on 2010-02-27T19:27:44.000+0000

With the current Zend_Cache implementation there are some issues for using it on other components:

  1. The only interface to use is an instance of Zend_Cache_Core (frontend) there is no way to set/add cache functionality without changing options of this instance -> e.g. serializing have to be done by component. If its enabled on cache it will be double serialized
  2. The components can't use the best cache frontend because it gets already a frontend. -> e.g. data of Zend_Locale/Zend_Config are based on source files and should use Zend_Cache_Frontend_File to remove cache if source file changed but can't use because they have to accept a cache instance of Zend_Cache_Core
  3. The components can't accept backends to set they're own frontend because the backend alone isn't simple to get and on set they're own frontend some options are set to backend, too. Additionally some important options like "caching" are not configurable out of the component. -> e.g. $frontend->setLifetime() sets the lifetime directive on backend, too

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.