Clear the internal Suspense cache used by useSuspenseStream.
Call this from an Error Boundary's onReset callback so that a retry
triggers a fresh thread-history fetch rather than re-throwing the
cached error.
invalidateSuspenseCache(cache: SuspenseCache = defaultSuspenseCache)| Name | Type | Description |
|---|---|---|
cache | SuspenseCache | Default: defaultSuspenseCache |
<ErrorBoundary
onReset={() => invalidateSuspenseCache()}
fallbackRender={({ resetErrorBoundary }) => (
<button onClick={resetErrorBoundary}>Retry</button>
)}
>
<Suspense fallback={<Spinner />}>
<Chat />
</Suspense>
</ErrorBoundary>