<<< Date Index >>>     <<< Thread Index >>>

Re: "reset hcache" function?



On Wednesday, August  2 at 05:11 PM, quoth René Clerc:
I suppose that storing some version number with the cache, and bumping it in the mutt code whenever (compatibility breaking) changes to the hcache code occur, should do the trick.

Supposedly, mutt already does this. The problem is that it doesn't bump the version number often enough, and when the version number changes it silently ignores the cache and just runs slowly rather than deleting it.

The problem with not bumping the version often enough becomes a problem because of the pointer thing: pointers are stored in the database, and no checking is done on whether or not the things they point to are still valid when they're pulled back out of the cache. If a library changed, or a data structure somewhere changed, or malloc() returned a different value than the last time mutt was run, then all the pointers are wrong, even though the format and content of the cache stayed the same (and thus the version number wasn't incremented).

~Kyle
--
The test of our progress is not whether we add more to the abundance of those who have much; it is whether we provide enough for those who have too little.
                                             -- Franklin D. Roosevelt

Attachment: pgpTDv5H6jeqc.pgp
Description: PGP signature