2

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.

Shoaibi
  • 859
  • 2
  • 11
  • 23

1 Answers1

2

This page should be useful for you:

Caching of Zend Framework application configuration file

ChrisA
  • 2,091
  • 1
  • 14
  • 23
  • great resources. How about just putting the (config, navigations, etc static) files in cache using an _init method in bootstrap? The only different is that in this know i know exactly whats being cached as i am doing it manually. Performance would be better or worse in this case when compared with the resource provided? I am just cautious not to add any extra overhead to coding :D – Shoaibi Aug 01 '11 at 14:54
  • 1
    How are you preventing the cache file from being read in by `Zend_Application` at the moment? The above is neat because it effectively just wraps how ZF works by default to allow caching. – ChrisA Aug 01 '11 at 15:00
  • good question. Understood the concept and marked as correct answer. Thanks. – Shoaibi Aug 01 '11 at 15:10