Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.7.8
-
Component/s: Zend_Cache
-
Labels:None
-
Tags:
Description
A setLifeTime() method would be very-very handful to change the lifetime without initialize a new cache object. At the moment we must have as much cache object as much lifetime we want use instead of using one cache object.
if(!$cache->start('mypage')) { echo 'This is cached with init lifetime ('.time().') '; $cache->end(); } $cache->setLifeTime( 3 ); if(!$cache->start('mypage2')) { echo 'This is cached with 3 seconds lifetime ('.time().') '; $cache->end(); }
please have a look at the API :
http://framework.zend.com/apidoc/core/Zend_Cache/Zend_Cache_Core.html#setLifetime
you can specify an alternative lifetime in the save method or you can use the setLifetime() method which... already exists !