mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-08 20:25:19 +02:00
refactor: remove type counts invalidation from document mutation atoms
This commit is contained in:
parent
ec79142d52
commit
7a2467c1ed
2 changed files with 0 additions and 10 deletions
|
|
@ -29,9 +29,6 @@ export const createDocumentMutationAtom = atomWithMutation((get) => {
|
|||
queryClient.invalidateQueries({
|
||||
queryKey: cacheKeys.documents.globalQueryParams(documentsQueryParams),
|
||||
});
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: cacheKeys.documents.typeCounts(searchSpaceId ?? undefined),
|
||||
});
|
||||
},
|
||||
};
|
||||
});
|
||||
|
|
@ -75,9 +72,6 @@ export const updateDocumentMutationAtom = atomWithMutation((get) => {
|
|||
queryClient.invalidateQueries({
|
||||
queryKey: cacheKeys.documents.document(String(request.id)),
|
||||
});
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: cacheKeys.documents.typeCounts(searchSpaceId ?? undefined),
|
||||
});
|
||||
},
|
||||
};
|
||||
});
|
||||
|
|
@ -109,9 +103,6 @@ export const deleteDocumentMutationAtom = atomWithMutation((get) => {
|
|||
queryClient.invalidateQueries({
|
||||
queryKey: cacheKeys.documents.document(String(request.id)),
|
||||
});
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: cacheKeys.documents.typeCounts(searchSpaceId ?? undefined),
|
||||
});
|
||||
},
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ export const cacheKeys = {
|
|||
withQueryParams: (queries: GetDocumentsRequest["queryParams"]) =>
|
||||
["documents-with-queries", ...(queries ? Object.values(queries) : [])] as const,
|
||||
document: (documentId: string) => ["document", documentId] as const,
|
||||
typeCounts: (searchSpaceId?: string) => ["documents", "type-counts", searchSpaceId] as const,
|
||||
byChunk: (chunkId: string) => ["documents", "by-chunk", chunkId] as const,
|
||||
},
|
||||
logs: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue