[neomutt-devel] Header Cache invalidation

Richard Russon rich at flatcap.org
Fri Sep 8 00:37:11 CEST 2017


Elimar wrote on the user mailing list:
> Running 2017-09-07 I have to rebuild hcache
> I had to rebuild hcache in ... almost every new version

You're right and unfortunately there's not much we can do about it.

We've been making a lot of structural changes to the code.  These should
make it easier to maintain and test.

The header cache works like this (we think :-)

The email's header is parsed and lots of objects are created, which store
the details:

* struct Address
* struct Parameter
* struct Body
* struct Envelope
* struct Header

It's these objects which are stored in the database (they are serialised).
If any of the objects are changed, then the database values can't be used.

Clearly, we need to make sure that the structs we used to save the values to
the database are identical to those we read into.  Mutt's build calculated
the md5sum of the relevant header files.  This is done by hcache/hcachever.sh

If this checksum changes, then the existing header cache is invalid.

We would like to replace this caching with something more reliable, but that
would mean someone has to, first, understand it fully.

Cheers,
    Rich / FlatCap
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://mailman.neomutt.org/pipermail/neomutt-devel-neomutt.org/attachments/20170907/701d3476/attachment.sig>


More information about the neomutt-devel mailing list