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
--
View this message in context:
http://www.nabble.com/Zend_Cache---MVC-tf4488489s16154.html#a12800270
Sent from the Zend Framework mailing list archive at Nabble.com.