I think this could be done with a plugin, you can check inside you
module which module/controller/action is requested and then just act as
needed.
JARUZ wrote:
> Hello:
>
> Are there examples on how to use Zend_Cache together with the MVC pattern?
> The documentation (and also this mailing list after several hours of
> searching) provide only examples for old-style procedural PHP applications
> (basically using Zend_Cache as a stand-alone package), but nothing about how
> to combine Zend_Cache with Controllers/Actions/Views/etc.
>
> I do not have any 'echo' statements in my code; everything is sent to the
> browser through $frontController->dispatch();... I would like to use cache
> within certain specific Actions from certain specific Controllers.
>
> For example:
>
> class IndexController extends Zend_Controller_Action
> {
> public function indexAction()
> {
> if($cache->start('mycache')) {
> $this->view->title = 'Cached' . time();
> }
> else {
> $this->view->title = 'Not Cached' . time();
> }
> }
> }
>
> Do I make sense or am I just not getting something on how the Cache should
> work? If anybody could give me some pointers, I really appreciate it.
>
> Thanks for your help!
>
> Cheers,
>
>
> Antonio
>