JSPM

  • Created
  • Published
  • Downloads 164082
  • Score
    100M100P100Q179201F
  • License MIT

Cache interceptor for axios

Package Exports

  • axios-cache-interceptor
  • axios-cache-interceptor/dist/index.js
  • axios-cache-interceptor/dist/index.min.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (axios-cache-interceptor) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme


Issues Stars License Codecov Blazing Fast
Downloads Minified Size Install Size Try on RunKit


  

📬 Axios Cache Interceptor


axios-cache-interceptor is a small and efficient cache interceptor for axios.


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

Documentation at axios-cache-interceptor.js.org 🎉🎉


License

Licensed under the MIT. See LICENSE for more informations.


Contact

See my contact information on my github profile or open a new issue.