Method RemoveExpiredAsync
- Namespace
- MailFathom.Application.Access.Sessions
- Assembly
- MailFathom.Application.dll
RemoveExpiredAsync(DateTimeOffset, CancellationToken)
Removes the sessions that can no longer authenticate anything.
Task RemoveExpiredAsync(DateTimeOffset removableFrom, CancellationToken cancellationToken)
Parameters
removableFromDateTimeOffsetThe instant a session must have expired before to be removed, exclusive because a session expiring at it still authenticates.
cancellationTokenCancellationTokenCancels the write.
Returns
Remarks
What keeps the bound below counting live sessions rather than history, and what keeps a row naming a user and a credential from standing for a month past the point it authenticated anything.
Exceptions
- ClientSessionStoreUnavailableException
Thrown when the sessions could not be reached, which reaches the operation that triggered the removal rather than being swallowed.