-
Notifications
You must be signed in to change notification settings - Fork 107
Set maxAge to forever? #242
Comments
Hey @ablakey I don't understand why it does not work 🤔 I will add a test to actually verify the behavior. Could you share how you setup axios-cache-adapter? Is it in the browser/node? Using a specific store? Cheers |
You may also put axios-cache-adapter in debug mode by passing |
Thanks for the tips. I can reproduce and with debug I get Configuration
import { setup } from "axios-cache-adapter";
export const axiosInstance = setup({
baseURL: BASE_URL,
withCredentials: true,
cache: {
maxAge: Number.POSITIVE_INFINITY,
debug: true,
exclude: {
query: false,
},
},
headers: { Accept: `application/json; version=${API_VERSION}` },
}); Debug Logs
If I keep the exact same config and context, and set maxAge to a finite number like Let me know how else I can help you reproduce and debug this issue. |
I've tried to set
maxAge: Number.POSITIVE_INFINITY
but that does not get respected as "forever".Is there a way to tell the cache to simply never invalidate (because I know I'm serving up immutable records at these URLs)?
The text was updated successfully, but these errors were encountered: