We have a case where we call a third party service which goes down a lot. I would like to cache the result and serve it if the value cannot be fetched, eg:
dalli.fetch('foo', :stale_after => 1.hour, :expires_in => 12.hours, :error_handler => nil) do
I'm inclined to make this a new method and not add more logic to fetch.
Also, how does this compare with race_condition_ttl?
@mperham Are you still interested in this? I think :stale_after is a great idea. Would you accept pull request implementing this?
Yeah, it's still relevant (but low priority for our use case) to us. Sure.