I have an action that renders two different view scripts based on whether the user is logged in or not.
class IndexController extends Zend_Controller_Action
{
....
public function indexAction()
{
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity())
{
$this->render('indexregistered');
return;
}
else {
$this->render('indexpublic');
return;
}
}
....
}
I have seen quite some useful examples on how to use the Zend Cache and they seem to be based on the fact that the action renders one particular script.
What am really looking at is the best approach to cache the indexpublic script which gets quite some hits and I would really like to avoid the Zend MVC overhead if possible.