From 13bee90bd8be2bae9bcff335c046f1d5e11891d1 Mon Sep 17 00:00:00 2001 From: Ishaan Gupta Date: Mon, 13 Apr 2026 03:57:05 +0530 Subject: [PATCH] perf(ui): align React Query cache between memory grid and graph (#845) --- apps/web/components/memory-graph/hooks/use-graph-api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/components/memory-graph/hooks/use-graph-api.ts b/apps/web/components/memory-graph/hooks/use-graph-api.ts index 3c3dd5d0..94c08e33 100644 --- a/apps/web/components/memory-graph/hooks/use-graph-api.ts +++ b/apps/web/components/memory-graph/hooks/use-graph-api.ts @@ -104,7 +104,7 @@ export function useGraphApi(options: UseGraphApiOptions = {}) { hasNextPage, fetchNextPage, } = useInfiniteQuery({ - queryKey: ["graph-documents", containerTags?.join(",")], + queryKey: ["documents-with-memories", containerTags, []], initialPageParam: 1, queryFn: async ({ pageParam }) => { const response = await $fetch("@post/documents/documents", { @@ -128,7 +128,7 @@ export function useGraphApi(options: UseGraphApiOptions = {}) { const { currentPage, totalPages } = lastPage.pagination return currentPage < totalPages ? currentPage + 1 : undefined }, - staleTime: 30 * 1000, + staleTime: 5 * 60 * 1000, enabled, })