mhgbrown / cached_resource

Caching for ActiveResource
MIT License
80 stars 28 forks source link

Using stale data when remote server unavailable #38

Open jrmhaig opened 6 years ago

jrmhaig commented 6 years ago

Firstly, thanks for the gem.

Is it possible to configure caching so that, in the event of the remote server being unavailable, cached values of the data can still used after they become stale?

Daniel-ltw commented 6 years ago

Based on what you are trying to achieve, I might suggest that you look into lib/cached_resource/caching.rb

It might also be good to have it as an option, so you might need to add something into lib/cached_resource/configuration.rb

Feel free to send in a pull request for this.