Tune the Header Cache#
Prerequisites#
NeoMutt built with a header cache backend.
A working cache directory on local storage.
Choose a Cache Location#
Pick a directory for caches:
set header_cache = "~/.cache/neomutt/hcache"
set message_cache_dir = "~/.cache/neomutt/bcache"
Restart NeoMutt.
Expected result: NeoMutt creates cache files in the selected locations.
Select a Backend Explicitly#
If multiple backends are available, pin one:
set header_cache_backend = "lmdb"
Expected result: NeoMutt uses the specified backend for header cache storage.
Enable Cache Compression#
Turn on compression to reduce disk usage:
set header_cache_compress_method = "zstd"
set header_cache_compress_level = 3
Expected result: cache files shrink at the cost of extra CPU.
Keep the Cache Clean#
For body caches, enable cleaning only when needed:
set message_cache_clean = yes
Disable it again if you notice performance impact.
Expected result: cache files no longer reference messages removed by other clients.
See How to Set Up Header/Body Caching for full details and supported backends.