The Cache class has been working pretty well for what it does, but I see 
a specific use case for which it doesn't quite fit as well as it could.

Imagine you have a thing that you fetch from a remote site to display on 
your Habari output.  You can put it in the cache.  When the cache item 
expires, you would fetch the item again to refresh it.

The problem happens when the remote resource becomes temporarily 
unavailable after the cache expires.  If the request is unable to 
refresh the cache, then the cache is empty rather than holding the last 
cached value.

I think we should build an additional parameter into Cache::set() that 
allows the cache value to persist after expiry, but report via a new 
method, Cache::expired(), that the cache has expired.

Thoughts on this?

Owen

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/habari-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to