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
perf/livekit-chat-count
moonrailgun 2 years ago
parent e0141f4bc4
commit fe90319e60

@ -130,9 +130,9 @@ export async function getCachedRegistryPlugins(): Promise<PluginManifest[]> {
export async function getCachedUserSettings() {
const data = await queryClient.fetchQuery(
[CacheKey.userSettings],
() => getUserSettings,
() => getUserSettings(),
{
staleTime: 1 * 60 * 1000, // 缓存1分钟
staleTime: 10 * 60 * 1000, // 缓存10分钟
}
);

Loading…
Cancel
Save