chore(integration): document cache purge intent

This commit is contained in:
Philipinho
2026-08-09 15:58:34 +01:00
parent 15cbcfb78d
commit bf56b7c2c2
2 changed files with 2 additions and 1 deletions
@@ -105,7 +105,7 @@ export function useDisconnectIntegration() {
queryKey: ["integration-connection", variables.integrationId], queryKey: ["integration-connection", variables.integrationId],
}); });
qc.invalidateQueries({ queryKey: ["my-connections"] }); qc.invalidateQueries({ queryKey: ["my-connections"] });
// removeQueries, not invalidate: refetchOnMount false would revive stale entries // removeQueries, not invalidate: refetchOnMount false leaves invalidated inactive queries unrefreshed
qc.removeQueries({ queryKey: ["unfurl"] }); qc.removeQueries({ queryKey: ["unfurl"] });
}, },
onError: (error) => { onError: (error) => {
@@ -123,6 +123,7 @@ export class UnfurlService {
} }
} }
} catch (err) { } catch (err) {
// best-effort by design: never fail a disconnect on cache purge; the TTL is the backstop
this.logger.error( this.logger.error(
`Failed to purge unfurl cache for user ${userId}: ${(err as Error).message}`, `Failed to purge unfurl cache for user ${userId}: ${(err as Error).message}`,
); );