Add option to ignore I/O errors and return cached content if it's in the cache
pmonks opened this issue · comments
Peter Monks commented
When an I/O error occurs and the cache contains content for the requested URL, I want the option to tell urlocal.api/input-stream
to return the cached content, so I can tolerate I/O errors at the expense of presenting potentially stale content.
Potential Solutions:
Add a new flag to the urlocal.api/input-stream
's opts
map that controls whether I/O exceptions are passed through when cached content is available (if cached content is not available, the exception should pass through regardless of the flag).