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

Altering cache mode depending on response #84

Open
eirnym opened this issue Oct 12, 2024 · 1 comment
Open

Altering cache mode depending on response #84

eirnym opened this issue Oct 12, 2024 · 1 comment

Comments

@eirnym
Copy link

eirnym commented Oct 12, 2024

I'd like to be able to alter caching mode depending on a response I get. Default implementation is already there, which uses HTTP headers to decide on that

E.g. I use a cache to hit an API endpoint and I'd like to handle errors properly (e.g. request limit), but force to cache for example 2xx responses, even http headers tell "no cache" to clear them later manually.

@06chaynes
Copy link
Owner

I think this should be doable. When I get in to make the other updates this weekend (hopefully) I will play around with including the body as an argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants