Cache of Email headers
The Header Cache saves data from email headers to a local store in order to speed up network mailboxes.
When NeoMutt parses an email, it stores the results in a number of structures (listed below). To save time and network traffic, NeoMutt can save the results into a store (optionally using compress).
To save the data, the Header Cache uses a set of 'dump' functions (Email-object serialiser) to 'serialise' the structures. The cache also stores a CRC checksum of the C structs that were used. When retrieving the data, the Header Cache uses a set of 'restore' functions to turn the data back into structs.
The CRC checksum is created by hcache/hcachever.sh during the build process. Whenever the definition of any of the structs changes, the CRC will change, invalidating any existing cached data.
BASEVERSION variable in hcache/hcachever.sh| File | Description |
|---|---|
| hcache/config.c | Config used by Header Cache |
| hcache/hcache.c | Header cache multiplexor |
| hcache/serialize.c | Email-object serialiser |
| Function | Description | Links |
|---|---|---|
| hcache_close() | Close the connection to the header cache | |
| hcache_delete_email() | Delete a key / data pair | |
| hcache_delete_raw() | Delete a key / data pair | |
| hcache_fetch_email() | Fetch and validate a message's header from the cache | |
| hcache_open() | Open the connection to the header cache | |
| hcache_store_email() | Store a Header along with a validity datum |