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

feat: make POST requests cacheable #24

Merged
merged 1 commit into from
Mar 19, 2022
Merged

Conversation

dwrBad
Copy link
Contributor

@dwrBad dwrBad commented Jan 6, 2022

This PR is related to #19

It makes POST requests cacheable. Default behavior will still be the same – only GET requests will be cached. But you may manually overwrite isRequestCacheable() to define a default behaviour. Additionaly you should/must overwrite onCacheKeyCalculation to define an adequate caching key (including the body for example).

@StarpTech
Copy link
Owner

Hi @dwrBad thank you for the PR. Before I review this PR we need to wait for #26. Please update this branch after the merge.

@dwrBad dwrBad force-pushed the main branch 2 times, most recently from b2bc1e5 to 6dd1af3 Compare February 8, 2022 11:49
@dwrBad
Copy link
Contributor Author

dwrBad commented Feb 8, 2022

Hi @StarpTech
I adjusted the code to fix the behaviour with the changes from #26 and updated the branch.
Thank you for looking into it!

@llc1123
Copy link

llc1123 commented Mar 19, 2022

+1 on this PR. LGTM.

Copy link
Owner

@StarpTech StarpTech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@StarpTech StarpTech merged commit b701148 into StarpTech:main Mar 19, 2022
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.

None yet

3 participants