mirror of
https://github.com/arthurfiorette/axios-cache-interceptor.git
synced 2025-12-08 17:36:16 +00:00
RangeError: Maximum call stack size exceeded on streams and other objects (#616)
* refactor: change id generation location * fix: lint * refactor: ensures id will be created only if cache is not false * chore(deps-dev): bump vitepress from 1.0.0-beta.5 to 1.0.0-beta.6 (#618) * chore(deps-dev): bump @types/node from 18.16.19 to 18.17.0 (#617) * chore(deps-dev): bump tslib from 2.6.0 to 2.6.1 (#619) * chore(deps-dev): bump @types/node from 18.17.0 to 18.17.1 (#620) * chore: dependabot * ci: dependabot * feat: handle non axios errors rejections (#609) * fix: correct config re throw * chore(deps-dev): bump eslint-config-prettier from 8.8.0 to 8.9.0 (#624) * chore(deps-dev): bump jest from 29.6.1 to 29.6.2 (#622) * feat: turn most types into interfaces (#615) * Turn most types into interfaces * Turn 'CacheAxiosResponse' into a interface * Update docs * Change docs to be more didactic * chore(deps-dev): bump jest-environment-jsdom from 29.6.1 to 29.6.2 (#623) * chore: removed unused eslint comment * feat: handle errors on object-code * feat: bring back ids * chore: lint --------- Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Arthur Fiorette <arthur.fiorette@gmail.com> Co-authored-by: Denis Rossati <denis.rossatiramos@gmail.com>
Using this package? Please consider donating to support my open source work ❤️
Help axios-cache-interceptor grow! Star and share this amazing repository with your friends and co-workers!
Axios Cache Interceptor
Cache interceptor for axios made with developers and performance in mind.
- ⚡ Faster!
- 📦 Handy builds!
- 🔩 Hassle free!
- 🛠️ Rich Features!
- 🌐 No network waste!
- 🔑 TypeScript!
Axios Cache Interceptor is, as it name says, a interceptor for axios to handle caching. It was created to help developers call axios multiple times without having to worry about overloading the network or coding himself a simple and buggy cache system.
import Axios from 'axios';
import { setupCache } from 'axios-cache-interceptor';
// Same object, new types.
const axios = setupCache(Axios);
const req1 = axios.get('https://arthur.place/');
const req2 = axios.get('https://arthur.place/');
const [res1, res2] = await Promise.all([req1, req2]);
res1.cached; // false
res2.cached; // true
License
Licensed under the MIT. See LICENSE for more informations.
Languages
TypeScript
97.2%
JavaScript
1.5%
Shell
1.3%