Skip to content

arthurfiorette/axios-cache-interceptor

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Help axios-cache-interceptor grow! Star and share this amazing repo with your friends and co-workers!


Issues Stars License Try on Runkit Codecov Downloads Bundlephobia Packagephobia FOSSA Status Join the chat at https://gitter.im/axios-cache-interceptor/community


⚑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.

FOSSA Status


Contact

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