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, })