Help axios-cache-interceptor grow! Star and share this amazing repo with your friends and co-workers!
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
Licensed under the MIT. See LICENSE
for more informations.
See my contact information on my github profile or open a new issue.