Ok, so I am using Zend Framework 1.12 with Doctrine 2.2.3. The Zend_Navigation
class is too simple and static for my liking, so I am implementing my own navigation class.
The scenario is as follows:
My application requires the navigation menu to be made of standard (compulsory) items (such as "Home", "About Us" and others) as well as user specific items (depending on user role). The dynamic menu items are stored in a database (MySQL) and I use Doctrine as my ORM and DBAL.
I'm attempting to write my own navigation class and partial view to render its contents, and in doing so, would like to know what performance issues I will have, if I query the db on every action call, then send the menu items back to the page? What would the best way to implement caching be? I have started using Zend_Registry_Namespace
to store my menu classes (the class also stores the current active menu item, which I use in my partial view to append CSS styling to the item).
Please help