Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retain stale on error #97

nathanmesserbbc opened this issue Oct 3, 2014 · 2 comments

Retain stale on error #97

nathanmesserbbc opened this issue Oct 3, 2014 · 2 comments


Copy link

@nathanmesserbbc nathanmesserbbc commented Oct 3, 2014

Hi there.

We have a use case for a cache that continues to serve stale content if the service that provides fresh values is slow or unavailable. Catbox almost does this for us, returning a stale value on the first request once a value is stale, but drops the stale value from the cache if there is an error in the generate function.

Would you be open to a pull request that makes this configurable through a option in the options passed into Policy, keeping the current behaviour as default?

@hueniverse hueniverse added the request label Oct 3, 2014

This comment has been minimized.

Copy link

@hueniverse hueniverse commented Oct 3, 2014

Sounds reasonable. Something like dropOnError which defaults to true.


This comment has been minimized.

Copy link
Contributor Author

@nathanmesserbbc nathanmesserbbc commented Oct 7, 2014

I've created a PR for this: #98

@hueniverse hueniverse self-assigned this Oct 8, 2014
@hueniverse hueniverse added this to the 3.4.4 milestone Oct 8, 2014
@hueniverse hueniverse closed this Oct 8, 2014
@Marsup Marsup added feature and removed request labels Sep 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.