axios-cache-interceptor
Cache interceptor for axios

axios-cache-interceptor downloads axios-cache-interceptor version axios-cache-interceptor license

axios-cache-interceptorPackages similaires:
Tendance de téléchargements npm
3 Ans
🌟 Affichez le graphique d'utilisation en temps réel sur le README.md de axios-cache-interceptor, il suffit de copier le code ci-dessous.
## Usage Trend
[![Usage Trend of axios-cache-interceptor](https://npm-compare.com/img/npm-trend/THREE_YEARS/axios-cache-interceptor.png)](https://npm-compare.com/axios-cache-interceptor#timeRange=THREE_YEARS)
Cumulative GitHub Star Trend
🌟 Affichez le graphique de tendance des GitHub Stars sur le README.md de axios-cache-interceptor, il suffit de copier le code ci-dessous.
## GitHub Stars Trend
[![GitHub Stars Trend of axios-cache-interceptor](https://npm-compare.com/img/github-trend/axios-cache-interceptor.png)](https://npm-compare.com/axios-cache-interceptor)
Détail des statistiques
Package
Téléchargements
Stars
Taille
Issues
Publication
Licence
axios-cache-interceptor187,8087921.19 MB11il y a un moisMIT
README pour axios-cache-interceptor

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 logo


License Codecov Downloads Bundlephobia Last commit



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';

const instance = Axios.create();
const axios = setupCache(instance);

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.

FOSSA Status


Star History

Star History Chart

All Thanks To Our Contributors: