// Import dependenciesimport{setup}from'axios-cache-adapter'// Create `axios` instance with pre-configured `axios-cache-adapter` attached to itconstapi=setup({// `axios` optionsbaseURL:'http://some-rest.api',// `axios-cache-adapter` optionscache:{maxAge:15*60*1000}})// Send a GET re...
],// Prefix all storage keys to prevent conflictsname:'my-cache'})// Create `axios` instance with pre-configured `axios-cache-adapter` using a `localforage` storereturnsetup({// `axios` optionsbaseURL:'http://some-rest.api',// `axios-cache-adapter` optionscache: {maxAge:15*60*1000,...
import{setup}from'axios-cache-adapter'constapi=setup({cache:{// Attempt reading stale cache data when response status is either 4xx or 5xxreadOnError:(error,request)=>{returnerror.response.status>=400&&error.response.status<600},// Deactivate `clearOnStale` option so that we can actually rea...
I'm using axios-cache-adapter for client-side caching, and I'm updating our instance to use a localForage store instead of relying on in-memory storage. https://www.npmjs.com/package/axios-cache-adapter#use-localforage-as-cache-store has some code examples on creating the localForage store...
Sorry to say, but it looks like this package is not being maintained. If anyone is looking for new ones, take a look at axios-cache-interceptor. 👍 2 🎉 1 Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in. Assignees No one assigned...
Firstly, I know about parameters for setting the max-age according to cache-control header. But what I mean is different. I want to look at the response itself and decide how much time I want to cache this response acording to the data in the response. Is this possible to do? Sign ...