diff --git a/surfsense_web/atoms/documents/document-mutation.atoms.ts b/surfsense_web/atoms/documents/document-mutation.atoms.ts index 736db896c..608862419 100644 --- a/surfsense_web/atoms/documents/document-mutation.atoms.ts +++ b/surfsense_web/atoms/documents/document-mutation.atoms.ts @@ -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), - }); }, }; }); diff --git a/surfsense_web/lib/query-client/cache-keys.ts b/surfsense_web/lib/query-client/cache-keys.ts index 3448b3fe8..883c40a77 100644 --- a/surfsense_web/lib/query-client/cache-keys.ts +++ b/surfsense_web/lib/query-client/cache-keys.ts @@ -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: {