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

Re: Again: attachment counting



On Saturday, 20 May 2006 at 13:34, Rocco Rutte wrote:
> Hi,
> 
> I just had this stupid idea for attachment counting as I recall someone 
> mentioning header caching in the thread some time ago and as I came 
> accross a CVS commit for that area.
> 
> However, as I read the maildir code, header caching shouldn't have any 
> effect. Writing to it is only done if the message is not present yet, 
> and when it's read for the first time, mutt IIRC doesn't do the full the 
> MIME parsing. But that would mean mutt would add the parse tree after 
> putting it in the hcache.
> 
> Is that assumption true?

yes, I believe so. note by the way that the attachment count can't be
reliably cached without also ensuring that the same attachment
configuration options are active. One conservative way to do this
would be to hash them all together and cache the hash with the count.

> Also, somehow related: as I've tuned my POP patch pretty much towards 
> Brendan's concerns, I still would like to do exactly that: when syncing 
> a folder, write the message to the hcache. However, all my attempts 
> failed and screwed up the cache. (I tried: delete first and then 
> insert).
> 
> Can somebody help me here?

I tried the same thing some time ago (it would have been groundwork
for offline IMAP reading) and also ended up corrupting the hcache
whenever I wrote the same header back into it. Sorry, that's no help,
it's just shared misery.

Attachment: pgpMBVSoLVHZy.pgp
Description: PGP signature