Skip to content

Commit

Permalink
fix: fix userSettings cache lost then make user settings drop bug
Browse files Browse the repository at this point in the history
if we refresh page between 1min - 10min, this bug will be occur
then if user set settings will overwrite user settings
  • Loading branch information
moonrailgun committed Aug 26, 2023
1 parent e0141f4 commit fe90319
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/shared/cache/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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分钟
}
);

Expand Down

0 comments on commit fe90319

Please sign in to comment.