aishek / axios-rate-limit

Rate limit for axios
MIT License
237 stars 35 forks source link

Orchestration with axios-cache-adapter #43

Open leandroz opened 3 years ago

leandroz commented 3 years ago

Thanks first for creating this tools, it was perfect for our use case!

We are using it in conjunction with https://github.com/RasCarlito/axios-cache-adapter, which allows us to cache some requests to speed up the process and reduce network trips.

The problem we have is that the cache requests count for the limit as well, is there a way to maybe expose a hook or similar to prevent a request counting for the limit if it was served from the cache? I can send a PR once we come up with the best solution.