Answer the question
In order to leave comments, you need to log in
How to get a cache object inside a model in ZF?
In Zend Framework , how can you get a reference to the Zend_Cache object (created in bootstrap by the __initCache() method ) from inside the model without passing a reference to it to the constructor? For example, from inside the controller, it's easy:
$bootstrap = $this->getInvokeArg( 'bootstrap' );
$cache = $bootstrap->getResource( 'Cache' );
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question