Search code examples
zend-frameworkzend-cachezend-logzend-config

Storing data in Zend_Registry vs Zend_Cache


So far i have been using Bootstrap.php to load my application.ini config into Zend_Registry as well as an instance of logger. I was wondering if storing these inside Zend_Cache would be a better solution as these remain unchanged over lifespan of application and whenever i redeploy application, cache is cleared on first run anyways. Whats your verdict on this?

Someone also suggested to create a controller which has logger and config stored in protected variables and then all of application controllers would inherit from that. I don't find that as a better solution then the current Zend_Registry one, not sure if i am justified.


Solution

  • This page should be useful for you:

    Caching of Zend Framework application configuration file