mirror of
https://github.com/arthurfiorette/axios-cache-interceptor.git
synced 2025-12-08 17:36:16 +00:00
docs: updated readme
This commit is contained in:
parent
0ddd1c7152
commit
29f2ce4d07
73
README.md
73
README.md
@ -1,40 +1,66 @@
|
||||
<p align="center">
|
||||
<b>Using this package?</b> Please consider <a href="https://github.com/sponsors/arthurfiorette" target="_blank">donating</a> to support my open source work ❤️
|
||||
<b>Using this package?</b> Please consider <a href="https://github.com/sponsors/arthurfiorette" target="_blank">donating</a> to support my open source work ❤️
|
||||
<br />
|
||||
<sup>
|
||||
Help axios-cache-interceptor grow! Star and share this amazing repo with your friends and co-workers!
|
||||
Help axios-cache-interceptor grow! Star and share this amazing repository with your friends and co-workers!
|
||||
</sup>
|
||||
</p>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
[](https://github.com/arthurfiorette/axios-cache-interceptor/blob/main/LICENSE)
|
||||
[](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://app.fossa.com/projects/git%2Bgithub.com%2Farthurfiorette%2Faxios-cache-interceptor?ref=badge_shield)
|
||||
[](https://github.com/arthurfiorette/axios-cache-interceptor/commits)
|
||||
<p align="center" title="We need a designer :)">
|
||||
<a href="https://axios-cache-interceptor.js.org" target="_blank" rel="noopener noreferrer">
|
||||
<img src="docs/src/public/rocket.png" width="180" alt="Axios Cache Interceptor logo" />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<br />
|
||||
|
||||
<h3 align="center">
|
||||
<b>⚡Axios Cache Interceptor</b> is a small and efficient cache interceptor for axios.
|
||||
<br />
|
||||
<br />
|
||||
</h3>
|
||||
<p align="center">
|
||||
<img alt="GitHub" src="https://img.shields.io/github/license/arthurfiorette/axios-cache-interceptor">
|
||||
<img alt="Codecov" src="https://img.shields.io/codecov/c/github/arthurfiorette/axios-cache-interceptor?token=ML0KGCU0VM">
|
||||
<img alt="Downloads" src="https://img.shields.io/npm/dm/axios-cache-interceptor?style=flat">
|
||||
<img alt="Bundlephobia" src="https://img.shields.io/bundlephobia/minzip/axios-cache-interceptor/latest?style=flat">
|
||||
<img alt="FOSSA Status" src="https://app.fossa.com/api/projects/git%2Bgithub.com%2Farthurfiorette%2Faxios-cache-interceptor.svg?type=shield">
|
||||
<img alt="Last commit" src="https://img.shields.io/github/last-commit/arthurfiorette/axios-cache-interceptor">
|
||||
</p>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
# Axios Cache Interceptor
|
||||
|
||||
> Cache interceptor for axios made with developers and performance in mind.
|
||||
|
||||
<br />
|
||||
|
||||
- ⚡ 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.
|
||||
|
||||
<br />
|
||||
|
||||
[Read the docs to **Learn More**.](https://axios-cache-interceptor.js.org)
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
```ts
|
||||
import Axios from 'axios';
|
||||
import { setupCache } from 'axios-cache-interceptor';
|
||||
|
||||
// same object, but with updated typings.
|
||||
// Same object, new types.
|
||||
const axios = setupCache(Axios);
|
||||
|
||||
const req1 = axios.get('https://api.example.com/');
|
||||
const req2 = axios.get('https://api.example.com/');
|
||||
const req1 = axios.get('https://arthur.place/');
|
||||
const req2 = axios.get('https://arthur.place/');
|
||||
|
||||
const [res1, res2] = await Promise.all([req1, req2]);
|
||||
|
||||
@ -44,12 +70,6 @@ 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.
|
||||
@ -57,10 +77,3 @@ 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 />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user