mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
remove cache
This commit is contained in:
@@ -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)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user