From fe90319e607dc6fecff085c15ff9b70fff4cb373 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Sat, 26 Aug 2023 23:48:44 +0800 Subject: [PATCH] fix: fix userSettings cache lost then make user settings drop bug if we refresh page between 1min - 10min, this bug will be occur then if user set settings will overwrite user settings --- client/shared/cache/cache.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/shared/cache/cache.ts b/client/shared/cache/cache.ts index 01c62075..c250958b 100644 --- a/client/shared/cache/cache.ts +++ b/client/shared/cache/cache.ts @@ -130,9 +130,9 @@ export async function getCachedRegistryPlugins(): Promise { export async function getCachedUserSettings() { const data = await queryClient.fetchQuery( [CacheKey.userSettings], - () => getUserSettings, + () => getUserSettings(), { - staleTime: 1 * 60 * 1000, // 缓存1分钟 + staleTime: 10 * 60 * 1000, // 缓存10分钟 } );