mirror of
https://github.com/arthurfiorette/axios-cache-interceptor.git
synced 2025-12-08 17:36:16 +00:00
* chore(deps-dev): bump axios from 0.27.2 to 1.0.0 Bumps [axios](https://github.com/axios/axios) from 0.27.2 to 1.0.0. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v0.27.2...v1.0.0) --- updated-dependencies: - dependency-name: axios dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * feat: initial changes * feat: more docs * docs: global config * feat: comparison * chore: more docs * docs: migrate docs generator to vitepress (#403) * chore(vitepress): add basic files * chore(vitepress): add dev deps & scripts for use * chore(vitepress config): change to ts for type checks * chore(vitepress config): remove js file * chore(vitepress theme): add custom theme css * chore(vitepress docs): add simple home page * chore(gitignore): ignore doc dist * chore(favicon): add icon to head * feat(doc-features): add features spotlight * chore(doc footer): made with ❤️ * chore(structure): move md files into `./src` * chore(config): re-organise * chore: custom dev port * feat: documentation pages * refactor: modified config * feat: social links * style: formatted code * feat: removed code groups temporarily * fix: fixed bundlephobia svg * docs: general documentation remake * docs: more rewritting Co-authored-by: arthurfiorette <arthur.fiorette@gmail.com> * fix: change headers usage * fix: adapters exporting changes * fix: request doesnt execute after abortion Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Cain <75994858+cainthebest@users.noreply.github.com>
68 lines
3.1 KiB
Markdown
68 lines
3.1 KiB
Markdown
<p align="center">
|
|
<i>
|
|
Help axios-cache-interceptor grow! Star and share this amazing repo with your friends and co-workers!
|
|
</i>
|
|
</p>
|
|
|
|
<br />
|
|
|
|
[](https://github.com/arthurfiorette/axios-cache-interceptor/issues)
|
|
[](https://github.com/arthurfiorette/axios-cache-interceptor/stargazers)
|
|
[](https://github.com/arthurfiorette/axios-cache-interceptor/blob/main/LICENSE)
|
|
[](https://npm.runkit.com/axios-cache-interceptor)
|
|
[](https://codecov.io/gh/arthurfiorette/axios-cache-interceptor)
|
|
[](https://www.npmjs.com/package/axios-cache-interceptor)
|
|
[](https://bundlephobia.com/package/axios-cache-interceptor@latest)
|
|
[](https://packagephobia.com/result?p=axios-cache-interceptor@latest)
|
|
[](https://app.fossa.com/projects/git%2Bgithub.com%2Farthurfiorette%2Faxios-cache-interceptor?ref=badge_shield)
|
|
[](https://gitter.im/axios-cache-interceptor/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
|
|
<br />
|
|
|
|
<h3 align="center">
|
|
<b>⚡Axios Cache Interceptor</b> is a small and efficient cache interceptor for axios.
|
|
<br />
|
|
<br />
|
|
</h3>
|
|
|
|
<br />
|
|
|
|
```ts
|
|
import Axios from 'axios';
|
|
import { setupCache } from 'axios-cache-interceptor';
|
|
|
|
// same object, but with updated typings.
|
|
const axios = setupCache(Axios);
|
|
|
|
const req1 = axios.get('https://api.example.com/');
|
|
const req2 = axios.get('https://api.example.com/');
|
|
|
|
const [res1, res2] = await Promise.all([req1, req2]);
|
|
|
|
res1.cached; // false
|
|
res2.cached; // true
|
|
```
|
|
|
|
<br />
|
|
|
|
<h3 align=center>
|
|
<a href="https://axios-cache-interceptor.js.org/" target="_blank">Documentation at <code>axios-cache-interceptor.js.org</code> 🎉🎉</a>
|
|
</h3>
|
|
|
|
<br />
|
|
|
|
## License
|
|
|
|
Licensed under the **MIT**. See [`LICENSE`](LICENSE) for more informations.
|
|
|
|
[](https://app.fossa.com/projects/git%2Bgithub.com%2Farthurfiorette%2Faxios-cache-interceptor?ref=badge_small)
|
|
|
|
<br />
|
|
|
|
## Contact
|
|
|
|
See my contact information on my [github profile](https://github.com/arthurfiorette) or
|
|
open a new issue.
|
|
|
|
<br />
|