axios-cache-adapter
axios-cache-adapter copied to clipboard
v3
:rocket: This is a first draft for the v3
Breaking changes
- Cache requests which have query parameters by default
- Simplified cache exclusion via middlewares
- Pre-built
excludeQuery(),excludePaths([/path-to-exclude-regexp/])andexcludeHttpMethods(['post', 'patch', 'put', 'delete'])exclusion middlewares - Only GET requests are cached by default
- Cache non GET requests with a custom exclusion config (Fixes #92)
- Response containing
arraybuffers andblobs are cached by default (Fixes #82)
Bug fix
- Handle
cache-control: must-revalidateand store it withmaxAge = Date.now()(Fixes #86)
Refactor
- Moved adapter code into its own file
Docs
- Rewrite of readme (Fixes #95)
Also trying to implement ideas from #57
Codecov Report
Merging #94 into master will not change coverage. The diff coverage is
100%.
@@ Coverage Diff @@
## master #94 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 10 11 +1
Lines 139 144 +5
=====================================
+ Hits 139 144 +5
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/config.js | 100% <ø> (ø) |
:arrow_up: |
| src/cache.js | 100% <100%> (ø) |
:arrow_up: |
| src/adapter.js | 100% <100%> (ø) |
|
| src/request.js | 100% <100%> (ø) |
:arrow_up: |
| src/index.js | 100% <100%> (ø) |
:arrow_up: |
| src/response.js | 100% <100%> (ø) |
:arrow_up: |
| src/exclude.js | 100% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 64ac601...591c0eb. Read the comment docs.
@RasCarlito When this awesome changes would be released?
@mohamedgomran Soon I hope, still need to spend some time changing some parts and updating the docs 😄
@RasCarlito - thoughts on when this will be merged to Master?
@RasCarlito Having the ability to cache binaries saved my skin today! I am so happy it was just a pre-release update! Thank you so much for this incredible work.
@RasCarlito Any updates on merging this?
I will start working on this project again. I have been focused on my own life for the past year. Sorry I had no time/energy to give back to the community. I should have tried giving control to someone else while I was unavailable but oh well. Hopefully it will now move forward.
@RasCarlito I can help if there is any pending features
@RasCarlito Willing to help you where ever I can, if there's anything, please don't hesitate. This project has been a core deliverable for my work, and would love to give back some of my time.
@RasCarlito any updates on this? I tried with the beta version but it gives an error. It would be really great if you could complete this. Will be very helpful to the community. I am ready to help in any manner.