Is it possible to have the faraday-http-cache middleware return a cached resource when the origin is down, sort of like what Cloudflare does? I ask because our Rails application is currently doubling as a sort of shared cache for our CMS's REST API and we would like to serve cached content if the CMS goes down.
There was a hack for this posted in a GitHub issue from 2016. The conversation suggests the use of the max-stale
cache directive because there were no concrete plans to implement the stale-if-error
directive from RFC 5861. Does anyone know for sure if this still works?
Thanks.