remove cache

This commit is contained in:
proddy
2024-08-10 13:19:17 +02:00
parent fd5e254a84
commit 3c04bfadc9

View File

@@ -9,12 +9,13 @@ export const ACCESS_TOKEN = 'access_token';
export const alovaInstance = createAlova({ export const alovaInstance = createAlova({
statesHook: ReactHook, statesHook: ReactHook,
timeout: 3000, // 3 seconds before throwing a timeout error timeout: 3000, // 3 seconds before throwing a timeout error
cacheFor: { cacheFor: null, // disable cache
GET: { // cacheFor: {
mode: 'memory', // GET: {
expire: 60 * 10 * 1000 // 60 seconds in cache // mode: 'memory',
} // expire: 60 * 10 * 1000 // 60 seconds in cache
}, // }
// },
requestAdapter: xhrRequestAdapter(), requestAdapter: xhrRequestAdapter(),
beforeRequest(method) { beforeRequest(method) {
if (localStorage.getItem(ACCESS_TOKEN)) { if (localStorage.getItem(ACCESS_TOKEN)) {