Expand description
Spam classification via LlmProvider with an optional cache.
classify hashes (sender, subject, body_preview) into a cache key
and consults the optional SpamCache before calling the provider.
On cache miss, the result is written back with a 24-hour TTL.
A Redis-backed SpamCache implementation (RedisSpamCache) is
available under the default redis-cache feature.
Structs§
- AiSpam
Result - AI spam classification result.
- Redis
Spam Cache - Redis-backed
SpamCacheusing a sharedredis::aio::ConnectionManager.
Traits§
- Spam
Cache - Pluggable cache for spam classification results.
Functions§
- classify
- Classify a message using
provider, consultingcacheif supplied.