-- dinok <dino.knoll@gmx.de> wrote
(on Monday, 11 August 2008, 12:03 PM -0700):
> I am currently thinking of the problem, how to cache view scripts of actions
> without the layout.
> The reason is very simple:
> I have a dynamic pagelayout with elements like username, custom rights and
> so on.
> But the content is the same, just think of rendering an article. There I
> have a hudge object which I have to render. There is a partial-loop,
> formatting the tags, maybe bbcode, formating a locale date..
>
> A possibility is to extend the Zend_Controller_Action and rewrite the
> dispatch method.
> Then I check if a response segment can be loaded from cache, when it's
> possible, I skip the dispatch process of the action and simply push the
> response in the response object.
>
> Do you have any other ideas?
Use a front controller plugin. On preDispatch(), check to see if the
currently selected action has been cached, and if so, push the cache
contents to the response object and unset the request object's
dispatched flag.
--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework |
http://framework.zend.com/