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

Implement skip cache by URI path & response header #21

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

ooaklee
Copy link

@ooaklee ooaklee commented Mar 8, 2024

Motivation

Firstly, this is a great package - thank you. I found that in the use case where someone might have wanted to skip caching particular responses or server paths intentionally, they were previously limited. With these proposed changes, users can specify a regex to restrict the cache's scope or set a previously defined header in their handler function to ensure the response is never cached (suitable for partially loaded site set-up, amongst other use cases).

What's Changed

  • Added a new ClientOption that takes the name of the response header used to skip caching response
  • Added a new ClientOption to allow a user to specify a URI path regex that skips caching for matching requests.
  • Updated README

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

Successfully merging this pull request may close these issues.

1 participant