perf(ui): align React Query cache between memory grid and graph (#845)

This commit is contained in:
Ishaan Gupta 2026-04-13 03:57:05 +05:30 committed by GitHub
parent cfd587ed2a
commit 13bee90bd8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -104,7 +104,7 @@ export function useGraphApi(options: UseGraphApiOptions = {}) {
hasNextPage,
fetchNextPage,
} = useInfiniteQuery<ApiDocumentsResponse, Error>({
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,
})