I would like to know how we can control the cache lifetime on a collection.
Here's how I initialize caching on my collection:
public function _construct()
{
...
// Configure collection cache
$this->initCache(
Mage::app()->getCacheInstance(),
'MY_COLLECTION',
array(Namespace_Module_Model_Something::CACHE_TAG)
);
parent::_construct();
}
Where the cache instance comes from Mage_Core_Model_Cache
. I can see how its frontend model is created out of Zend_Cache_Core
-- whose class provides a cache lifetime setter. But this does not appear to solve my problem.
I'm using APC caching on the backend, and that's what I want to modify when the cache entry is written. And I'd like to be able to control this per collection (as in the constructor shown above).
Is this possible?