You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FEAT: Email body cache should have a size limit #521
Email bodies are cached to disk via config.SaveEmailBody() with no global size limit or eviction policy. For active users with large mailboxes, the ~/.cache/matcha/email_bodies/ directory can grow to hundreds of megabytes or more over time.
Describe the solution you'd like
Implement a cache size limit with LRU eviction:
Set a configurable maximum cache size (e.g. default 100MB)
When the limit is reached, evict the least recently accessed entries
Alternatively, use time-based expiration (e.g. evict entries older than 30 days)
Describe alternatives you've considered
Manual cache clearing by the user (rm -rf ~/.cache/matcha/email_bodies/). This works but is not user-friendly and clears everything.
Additional context
The existing PruneStaleBodyCache function only removes bodies for UIDs no longer in the folder email list — it doesn't limit total cache size.
Activity
mavonx commentedon May 11, 2026
Hi @andrinoff,
It seems I already solved this issue before in #1171 and #1227.
So I can’t understand what the difference is. I think my work may have just been overwritten?
andrinoff commentedon May 11, 2026
It was improved in #1257 by @FromSi
mavonx commentedon May 11, 2026
@andrinoff
Is the only difference that the cache is now global across all folders instead of per-folder?
andrinoff commentedon May 11, 2026
also a more robust multi-email caching, where it fails less, than you're variation did