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

Re: ANNOUNCE: maildir header cachefor current development cvs (WAS: Re: [OT] I'm Just A Programmer and Re: ANNOUNCE: maildir header cachefor current development cvs))



On 2004-02-08 17:24:52 -0500, David Yitzchak Cohen wrote:
> On Sun, Feb 08, 2004 at 04:44:35PM EST, Thomas Glanzmann wrote:
> 
> > > Also, I think what I said in my previous mail isn't 100% correct: if you
> > > look at a new message, it should be moved from the new/ subdir to the cur/
> > > subdir, and if you delete it, its filename is changed, IIRC ... in both
> > > of the above cases, mtimes of the new/ and cur/ should be updated, and
> > > you may want to argue that no other changes really matter 99% of the time.
> > > (For the other 1% of the time (i.e., for functions like edit-type, etc.),
> > > you can force an immediate cache invalidation before exiting the function
> > > in question.)
> > 
> > The problem is that I care about the 1% see [1]. Especially in the case
> > of an external modification but we could do it configurable. My patch
> > doesn't invalidate the cache on edit (maybe it does, but not explicit),
> > deletion or change flags.
> 
> <quote from="[1]">
> Afte editing files in a maildir's cur or new subdir mutt does not notice
> the change and does not update hcache.db.  Instead the messages are
> displayed with a currupted message body.
> </quote>

The message body corruption could be fixed by stating the message file
before or after opening it (which should be negligible overhead) and
discarding/updating the cache when the file is newer than the cache.


> Why don't you just make a special file in new/ and in cur/ and touch
> it every time you touch a message?

If you have to touch anything explicitely, why not the directory? That
way you will only have to stat the directory, instead of the directory
and the special file.

        hp

-- 
   _  | Peter J. Holzer      | Shooting the users in the foot is bad. 
|_|_) | Sysadmin WSR / LUGA  | Giving them a gun isn't.
| |   | hjp@xxxxxxxxx        |  -- Gordon Schumacher,
__/   | http://www.hjp.at/   |     mozilla bug #84128

Attachment: pgp7kT4gTSLjO.pgp
Description: PGP signature