Method RemoveExpiredAsync
- Namespace
- MailFathom.Application.Signals
- Assembly
- MailFathom.Application.dll
RemoveExpiredAsync(DateTimeOffset, CancellationToken)
Forgets the tickets that can no longer be presented.
Task RemoveExpiredAsync(DateTimeOffset removableFrom, CancellationToken cancellationToken)
Parameters
removableFromDateTimeOffsetThe instant expiry is judged against: a ticket is dropped once this has passed its recorded expiry.
cancellationTokenCancellationTokenCancels the removal.
Returns
- Task
A task that completes when the expired tickets are gone.
Remarks
Bounded by what it can match rather than by a limit the caller passes: an implementation reaches the expired tickets through an ordering on the expiry, so the work is proportional to what has expired since the last removal rather than to every ticket ever minted.
Exceptions
- ClientSignalTicketStoreUnavailableException
Thrown when the removal could not run, which reaches the mint that triggered it rather than being swallowed.