My only issue is that it might be confusing when you're wondering which
cached values will and won't "expire" (ie: be purged). My only solution to
this is that everything should hang around until manually removed, and you
should just check with Cache::expired() like most people do with
Cache::has() now... But then you'd potentially end up with craploads of
stuff hanging around.

Since that's not really a viable solution, I guess I'm +1 on the proposed
keep-it-forever parameter.

On Sat, May 9, 2009 at 2:34 PM, Caius Durling <[email protected]> wrote:

> On 9 May 2009, at 18:12, Owen Winkler wrote:
>
> 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.
>
>
> We ran into this at work the other day, keeping the original value in cache
> if the remote resource isn't available is the best way.
>
> +1 for this from me.
>
> C
> ---
> Caius Durling
> [email protected]
> +44 (0) 7960 268 100
> http://caius.name/
>
>

--~--~---------~--~----~------------~-------~--~----~
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