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 libhcache |
hcache/hcache.c | Header cache multiplexor |
hcache/serialize.c | Email-object serialiser |
Function | Description |
---|---|
mutt_hcache_close() | close the connection to the header cache |
mutt_hcache_delete_record() | delete a key / data pair |
mutt_hcache_fetch() | fetch and validate a message's header from the cache |
mutt_hcache_free_raw() | free data fetched with mutt_hcache_fetch_raw() |
mutt_hcache_open() | open the connection to the header cache |
mutt_hcache_store() | store a Header along with a validity datum |