Hi, I'm using Zend_Cache to cache the results of remote API calls. When the cache expires we attempt to update the cached data, but sometimes the API times out or fails for other reasons.
In this situation I want to continue to use the (now-expired) cached data until we can update the cache, but cannot get this to work with Zend_Cache, even using the $doNotTestCacheValidity parameter. My test code is available at: http://stackoverflow.com/questions/9002445/zend-cache-retrieve-expired-data Is this possible with Zend_Cache? I know my architecture is not ideal, since every hit to the expired cache (in the vent of the API being down) is going to try to update the cache, so an option to increase the cache lifetime would be more performant. The only way I can see at present is to change my caching strategy entirely, having a cron-run script to update each cache, and an infinite lifetime for every file. I really don't want to centralise everything in this way if avoidable. I'd originally posted this question on StackOverflow, at: http://stackoverflow.com/questions/9002445/zend-cache-retrieve-expired-data, and there's more information available there. Thanks, Peter -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Continuing-to-use-expired-Zend-Cache-when-update-fails-tp4372368p4372368.html Sent from the Zend Framework mailing list archive at Nabble.com. -- List: [email protected] Info: http://framework.zend.com/archives Unsubscribe: [email protected]
