Release the database connection and any associated resources.
Remove a single cache entry by message ID. No-op if the entry does not exist.
Evict least-recently-used entries until there is room for
incomingBytes within cacheSizeLimitBytes.
Remove all cache entries and associated storage (filesystem files, etc.).
Remove all cache entries belonging to the given email address ID.
Remove all cache entries belonging to the given sudo ID.
Read the persisted cache size limit from the settings table. Returns undefined if no limit has been persisted yet.
Retrieve a cached entry by message ID. Updates the entry's last-accessed timestamp on hit. Returns undefined on miss or if the entry is stale/unreadable.
Return the sum of all entry sizes in bytes.
Create schema tables/indexes and load persisted settings. Called once after construction.
Store a cache entry. The adapter decides internally whether to store inline or on the filesystem based on its own strategy.
Persist a new cache size limit to the settings table.
Domain-aware storage adapter for the email message body cache. Each implementation owns its schema, SQL, and storage strategy.