[Zope] Re: Non-caching version of POPMail ?

Loren Stafford lstafford@morphics.com
Tue, 3 Apr 2001 16:19:20 -0700


David

I actually thought better of my idea right after sending the first email.
Now I plan to add a couple of methods to the POPMailBase:

CacheFlush(self) -- If the cache ever gets out of sync, I can fix it.

ListFullMessages(self) -- Since my application is not interactive, it never
calls GetFullMessage().

Your auto sync'ing scheme will probably work most of the time, but I ran
into cases where a UID had been reused shortly after it was deleted from the
server. I don't think your scheme would correct that.

Anyway, please send me your current version. I'll send it back with my
additions, if you want.

-- Thanks
-- Loren

> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of David
> Shaw
> Sent: Tuesday, April 03, 2001 15:37
> To: Loren Stafford
> Cc: zope@zope.org
> Subject: [Zope] Re: Non-caching version of POPMail ?
>
>
> I actually solved this on my working version in a different way.  I simply
> call UIDL on a refresh and if any of the UIDs I have are not in
> the UID list
> from the server, I delete the message from the MessageDict.  It
> accomplishes
> the same thing without the large performance hit of not caching.
>
> I've started working on this product again.  I'd be happy to send you my
> current working revision if you want to take a look.  It's not anything
> significant enough yet to warrant a new release, but I am making
> it better.
> My next adventure is to do better message parsing to make URLs and email
> addresses clickable.  I just got the O'Reilly Regular Expression book and
> plan on delving into it when I get a chance.
>
>
> Loren Stafford said:
>
> > David,
> >
> > I'm planning to modify POPMail (or more likely, make a derived product
> > POPMailNc) so that there is no persistent message cache. I just
> wanted to
> > pass the idea by you, so you could tell me if I'm doing
> something stupid or
> > if you've already solved my problem for me in a newer version
> of POPMail.
> >
> > I'm using POPMail to couple my Zope server to another product
> > (PerfectTracker). Zope initiates Tracker incidents via sendmail
> and receives
> > responses from the Tracker at a dedicated POP3 mailbox, which it polls
> > (using Xron) every 5-10 minutes. I've discovered that if I ever delete
> > messages from the mailbox manually (i.e. using a POP client other than
> > POPMail) POPMail's persistent message cache gets hopelessly out
> of sync with
> > the mailbox, and it begins to deliver messages from its cache
> when there are
> > new messages with the same UID in the mailbox. That's bad.
> >
> > While I don't need to delete messages behind POPMail's back, I
> can't really
> > prevent someone from doing so, due to the nature of our mail
> system. So I
> > propose to make POPMail's cache non-persistent (I guess it
> really wouldn't
> > be a cache then, would it?). I don't expect a performance
> problem, because,
> > if I delete old messages regularly I will never have more than
> a few hundred
> > messages in the mailbox. (Messages correspond to new employees.)
> >
> > I think I can make uidDict and MessageDict nonpersistent simply
> by changing
> > their names to _v_uidDict and _v_MessasgeDict. Is that correct?
> >
> > -- Thanks for your input
> > -- Loren
> >
>
> --
> David Shaw -- Senior Software Developer -- ZapMedia -- 678.420.2715
>
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>