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

Re: Maildir header cache now supports imap, too



Hi Adeodato,

>   FWIW, having both libdb4-dev and libgdbm-dev installed,
>   --enable-hcache ends up linking mutt with libdb-4.

I know, this should be fixed. Or there should be more error checking
around the db4 code, because it isn't nfs safe, doesn't detect if
databae file is corrupt or in wrong byteorder and I don't know how
concurent access are handled. However I'll do this some times.

>   IMO, instead of "when upgrading to a newer version of the patch delete
>   the cache file", the patch itself should take care of (perhaps via a
>   field in the cache file) noticing when the cache file becomes no
>   longer valid.

True. I thought about this, too. The problem is that I need the output
of mutt -v to get 100% sure that the cache is valid. However the mutt -v
output is coded in a way that I can't use it without putting the stuff
in a string. currently it's more or less like that

        puts(...
        #if FEATURE
        "+FEATURE"
        #endif /* FEATURE */
        );

>   currently, the response varies from "Segmentation fault" to "Out of
>   memory!".

For DB4. For gdbm it's 'only' segmentation fault. I keep bashing DB4.
:-)

Feel free to provide patches for this. Also it would be nice to tell the
user about problems when using the cache, like:

'cache is already opened rw by another process ... faling back ro'
'can't open hcache: no such file or dir'
'creating new cache file'
'invalidating cache'

and so on.

        Thomas