Skip to content

Commit 57c6ef7

Browse files
scttcpercodex
andauthored
fix(replays): Remove gcTime: infinite for replay dom caching (#121529)
allow react query to eject this data at some point. still cached while useQuery is listening. Co-authored-by: Codex <noreply@openai.com>
1 parent f133cb3 commit 57c6ef7

3 files changed

Lines changed: 2 additions & 3 deletions

File tree

static/app/utils/replays/hooks/useExtractDiffMutations.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,6 @@ export function useExtractDiffMutations({
265265
queryFn: () =>
266266
extractDiffMutations({replay, rangeStartTimestampMs, rangeEndTimestampMs}),
267267
enabled: true,
268-
gcTime: Infinity,
268+
staleTime: Infinity,
269269
});
270270
}

static/app/utils/replays/hooks/useExtractDomNodes.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export function useExtractDomNodes({replay, frame, enabled}: Params) {
1818
// visualize the rendered elements
1919
queryFn: () => replay?.getDomNodesForFrame({frame}) ?? null,
2020
enabled: Boolean(!replay?.isFetching() && enabled),
21-
gcTime: Infinity,
2221
staleTime: Infinity,
2322
retry: false,
2423
});

static/app/utils/replays/hooks/useExtractPageHtml.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,6 @@ export function useExtractPageHtml({replay, offsetMsToStopAt}: Props) {
6565
startTimestampMs: replay?.getReplay().started_at.getTime() ?? 0,
6666
}),
6767
enabled: Boolean(replay),
68-
gcTime: Infinity,
68+
staleTime: Infinity,
6969
});
7070
}

0 commit comments

Comments
 (0)