mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-04-28 03:29:59 +00:00
perf(ui): align React Query cache between memory grid and graph (#845)
This commit is contained in:
parent
cfd587ed2a
commit
13bee90bd8
1 changed files with 2 additions and 2 deletions
|
|
@ -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,
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue