How would you implement caching of the layout content in Zend Framework?
In the layout.phtml
I do: $this->layout->content
and I want the content of this variable to be cached. The other widgets from the layout are real time (or cached other way).
The best bets are:
- static cache (the fastest)
- page cache
My pages already have unique page id (canonical
), so it could be used as page cache tag.
Potentially looks like I have to overload __get
property of the layout.
I'm trying to do something like the layout of SO (user panel at the top, rest cached for all).
I assume, site should work without JavaScript.