lisaogren / axios-cache-adapter

Caching adapter for axios. Store request results in a configurable store to prevent unneeded network requests.
MIT License
726 stars 107 forks source link

Ability to cache post, patch, put, delete methods #128

Closed mohamedgomran closed 4 years ago

mohamedgomran commented 5 years ago

Adding ability to cache post, patch, put, delete methods and making cache stale when request body changes.

codecov[bot] commented 5 years ago

Codecov Report

Merging #128 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #128   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          12     12           
  Lines         170    175    +5     
=====================================
+ Hits          170    175    +5
Impacted Files Coverage Δ
src/request.js 100% <ø> (ø) :arrow_up:
src/cache.js 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b49888c...d127a50. Read the comment docs.

ghost commented 4 years ago

Nice technique to get it working! But coverage has massively dropped on some files and I don't really get why 😞

mohamedgomran commented 4 years ago

@RasCarlito I was proposing the PR and will write the required tests if it would be merged

ghost commented 4 years ago

Ok! Well if you are up for it I'll merge it when it is done. Also if you could rebase your branch on origin/master so that only the commits related to this modification show up it'd be awesome. Cheers

mohamedgomran commented 4 years ago

@RasCarlito Tests done, coverage is increased by 0.02% :"D

mohamedgomran commented 4 years ago

@RasCarlito Any updates?

Epick362 commented 4 years ago

Any update on this @RasCarlito ? This would be a very handy feature.

ghost commented 4 years ago

Sorry for not getting back to you.

Merging this and planning a release very soon 🚀

Cheers

soberams commented 4 years ago

@RasCarlito could you please tell which version has this code change? Or has it not been released yet?

OliverEvans96 commented 4 years ago

Looks like there hasn't been a new release since this was merged. Would be great to see it published!