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

Ådd feature to blacklist some paths #754

Conversation

kcsujeet
Copy link
Contributor

@kcsujeet kcsujeet commented Dec 20, 2023

Changes

  • added an exclude option similar to the one in axios-cache-adapter
  • added ability to blacklist some url paths so that data is not cached for them

Description

  • url paths added in exclude.paths are matched against current url. If current url matches with any excluded urls, then the response for that request is not cached.

Copy link

codecov bot commented Dec 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b9da1fe) 99.61% compared to head (0029e59) 99.62%.

❗ Current head 0029e59 differs from pull request most recent head 31e6017. Consider uploading reports for the commit 31e6017 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #754   +/-   ##
=======================================
  Coverage   99.61%   99.62%           
=======================================
  Files          19       19           
  Lines        2352     2383   +31     
  Branches      208      211    +3     
=======================================
+ Hits         2343     2374   +31     
  Misses          8        8           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kcsujeet kcsujeet changed the title add feature to blacklist some paths Ådd feature to blacklist some paths Dec 20, 2023
@kcsujeet
Copy link
Contributor Author

Hey @arthurfiorette .... can i get some feedbacks on this?

@arthurfiorette
Copy link
Owner

Hey, I think using the previous cachePredicate API will be better, did the required changes and will release asaic.

@arthurfiorette arthurfiorette merged commit 0571298 into arthurfiorette:main Dec 23, 2023
3 checks passed
@kcsujeet
Copy link
Contributor Author

@arthurfiorette thanks for the swift response. And, also for making necessary changes. Was waiting for this feature in the lib ... will be very useful in my project. 🙌

@arthurfiorette
Copy link
Owner

Released under v1.4.0

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

2 participants