axios-cache-interceptor
TypeScript icon, indicating that this package has built-in type declarations

1.6.2 • Public • Published

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.


Read the docs to Learn More.



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:


Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.6.2
62,779latest

Version History

VersionDownloads (Last 7 Days)Published
1.6.2
62,779
1.6.1
672
1.6.0
13,860
1.5.3
17,914
1.5.23,718
1.5.18,187
1.5.08
1.4.11,871
1.4.0138
1.3.31,294
1.3.24,277
1.3.111,608
1.3.0675
1.2.02,656
1.1.1669
1.1.033
1.0.11,574
1.0.0194
0.10.77,493
0.10.638
0.10.56
0.10.43
0.10.31,372
0.10.2143
0.10.123
0.10.04
0.9.3544
0.9.26
0.9.19
0.9.010
0.8.1041
0.8.96
0.8.88
0.8.514
0.8.418
0.8.341
0.8.26
0.8.14
0.8.010
0.8.0-beta12
0.7.95
0.7.810
0.7.72
0.7.63
0.7.54
0.7.46
0.7.38
0.7.24
0.7.116
0.7.0-beta32
0.7.0-beta22
0.7.0-beta12
0.6.34
0.6.23
0.6.14
0.6.05
0.5.144
0.5.05
0.4.15
0.4.07
0.3.03
0.2.844
0.2.76
0.2.65
0.2.52
0.2.47
0.2.34
0.2.22
0.2.18
0.2.017
0.1.32
0.1.210
0.1.13
0.0.64
0.0.53
0.0.34
0.0.12

Package Sidebar

Install

npm i axios-cache-interceptor

Weekly Downloads

142,195

Version

1.6.2

License

MIT

Unpacked Size

1.15 MB

Total Files

107

Last publish

Collaborators

  • hazork