Interface IEmailSpamClassificationStore
- Namespace
- MailFathom.Application.Spam
- Assembly
- MailFathom.Application.dll
Persists the classification recorded for a stored occurrence.
public interface IEmailSpamClassificationStore
Remarks
One classification per occurrence, which is what makes classifying the same occurrence twice produce one record rather than a history: the record says what is believed about the message now, and a second evaluation replaces it. The store is therefore an upsert keyed by the occurrence, and re-running a classification is safe to repeat.
The record is derived data hanging off the occurrence, so it is removed with the occurrence rather than by a pass of its own — which is what keeps it inside whatever erasure and retention already reach the message it describes.
Methods
- FindAsync(StoredEmailId, CancellationToken)
Finds the classification recorded for one occurrence.
- SaveAsync(IPersistenceSession, SpamClassification, CancellationToken)
Stages the classification of one occurrence, replacing whatever was recorded for it.