diff --git a/frontend/src/modules/Rft/queryHooks.ts b/frontend/src/modules/Rft/queryHooks.ts index df018180e..841a97e58 100644 --- a/frontend/src/modules/Rft/queryHooks.ts +++ b/frontend/src/modules/Rft/queryHooks.ts @@ -7,13 +7,13 @@ const CACHE_TIME = 60 * 1000; export function useRftWellList( caseUuid: string | undefined, - ensembleName: string | undefined, + ensembleName: string | undefined ): UseQueryResult { return useQuery({ queryKey: ["getRftWellList", caseUuid, ensembleName], queryFn: () => apiService.rft.getRftInfo(caseUuid ?? "", ensembleName ?? ""), staleTime: STALE_TIME, - cacheTime: CACHE_TIME, + gcTime: CACHE_TIME, enabled: caseUuid && ensembleName ? true : false, }); } @@ -24,14 +24,29 @@ export function useRftRealizationData( wellName: string | undefined, responseName: string | undefined, timePoints: number[] | undefined, - realizationNums: number[] | null | undefined, + realizationNums: number[] | null | undefined ): UseQueryResult { return useQuery({ - queryKey: ["getRftRealizationData", caseUuid, ensembleName, wellName, responseName, timePoints, realizationNums], - queryFn: () => apiService.rft.getRealizationData(caseUuid ?? "", ensembleName ?? "", wellName ?? "", responseName ?? "", timePoints ?? undefined, realizationNums ?? undefined), + queryKey: [ + "getRftRealizationData", + caseUuid, + ensembleName, + wellName, + responseName, + timePoints, + realizationNums, + ], + queryFn: () => + apiService.rft.getRealizationData( + caseUuid ?? "", + ensembleName ?? "", + wellName ?? "", + responseName ?? "", + timePoints ?? undefined, + realizationNums ?? undefined + ), staleTime: STALE_TIME, - cacheTime: CACHE_TIME, + gcTime: CACHE_TIME, enabled: caseUuid && ensembleName && wellName && responseName ? true : false, }); } -