jaredwray/cacheable

Implementing RFC 5861: stale-if-error

Closed this issue · 2 comments

It would be nice to support the 'stale-if-error' header.
I have created a PR to http-cache-semantics here: kornelski/http-cache-semantics#30

The change is compatible with the code in its current form, I am going to add a PR with the update and a test case.

Actually I realised that the correct behaviour in case of error would be:

  • return a stale copy
  • firing an error event (so that it can be logged or used for monitoring)

going to reference it in the other issue also and close this out