From 94b869c1ed88e04ca7c86afb3aab028348b19955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20M=C4=99dryga=C5=82?= Date: Mon, 8 Jul 2024 08:58:49 +0200 Subject: [PATCH] fix: fixed caching wrong paths by axios --- package.json | 2 +- plugins/axios.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b62533d7..2124e14c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "store", - "version": "2.3.0", + "version": "2.3.1", "private": true, "scripts": { "start": "nuxt start", diff --git a/plugins/axios.ts b/plugins/axios.ts index f1dd43c2..88220b73 100644 --- a/plugins/axios.ts +++ b/plugins/axios.ts @@ -94,7 +94,8 @@ export default defineNuxtPlugin((nuxt) => { config._beginTime = Date.now() // Disable cache for some paths - if (pathsWithoutCache.some((url) => config.url?.includes(url))) config.cache = false + if ([...pathsWithoutCache, ...pathsWithAuth].some((url) => config.url?.includes(url))) + config.cache = false // @ts-ignore this $i18n exists, but it's not in the Nuxt types for some reason const apiLanguage = languageStore.getLanguageByIso(nuxt.$i18n.locale.value)