Is it possible to have two different cache instances for Zend_Cache?
For instance, if I wanted to have a set of files that are stored forever unless I delete them and another set that gets invalidated every minute — could I do that?
Everywhere I look I always see only one frontend and backend configuration used.
Thanks!
You simply create two different instances of Zend_Cache and stick them somewhere handy. I did something like this once, instantiating the cache instances in the boostrap, and just sticking them in the registry, like this:
So, there’s really nothing about the design of Zend_Cache that limits the number of different caches you can have. You can configure them all independently, using whatever front-end and back-end you like for each.