Describe the bug
config.SaveEmailBody writes every fetched body into ~/.cache/matcha/email_bodies/ and never evicts. After a year of heavy use the cache hits hundreds of MB / GB; on small SSDs (laptops, Raspberry Pi) this is a real quota issue.
Expected behavior
Configurable cap (default 500 MB?) with LRU eviction. The existing PruneEmailBodyCache only prunes by UID set, not by size.
Why it's hard
LRU eviction needs an access log persisted alongside each entry, and the eviction has to be safe against concurrent reads. Doing it right means a tiny SQLite-backed metadata sidecar.
Describe the bug
config.SaveEmailBodywrites every fetched body into~/.cache/matcha/email_bodies/and never evicts. After a year of heavy use the cache hits hundreds of MB / GB; on small SSDs (laptops, Raspberry Pi) this is a real quota issue.Expected behavior
Configurable cap (default 500 MB?) with LRU eviction. The existing
PruneEmailBodyCacheonly prunes by UID set, not by size.Why it's hard
LRU eviction needs an access log persisted alongside each entry, and the eviction has to be safe against concurrent reads. Doing it right means a tiny SQLite-backed metadata sidecar.