[Tickets #11612] Re: Broken imap fetch query

bugs at horde.org bugs at horde.org
Wed Oct 31 23:07:59 UTC 2012


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/11612
------------------------------------------------------------------------------
  Ticket             | 11612
  Updated By         | Michael Slusarz <slusarz at horde.org>
  Summary            | Broken imap fetch query
  Queue              | Horde Framework Packages
  Version            | Git master
  Type               | Bug
-State              | Feedback
+State              | Resolved
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             | Michael Slusarz
------------------------------------------------------------------------------


Michael Slusarz <slusarz at horde.org> (2012-10-31 17:07) wrote:

>> FYI: depending on what you are doing with this return, it may be much
>> faster to use STATUS_SYNCFLAGUIDS and/or STATUS_SYNCVANISHED instead
>> - if using Imap_Client's cache, this methods eliminate 1-2 calls to
>> the remote server.
>
> Thanks for the tip. At the point in the code where this is (was)  
> happening, I need to know about new/changed messages as well as  
> vanished messages. For the changed messages I need the actual state  
> of any flags so I don't think I can use the STAUS_SYNCFLAGUIDS. I  
> might be able to make use of the STATUS_SYNCVANISHED value, as well  
> as tweak other parts of the code where I am only "pinging" the  
> server to check for the existence of a change without needed to know  
> what the change is.

IIRC, you are not using Imap_Client's built-in caching?  If no, then  
these don't do anything for you (since QRESYNC/CONDSTORE isn't syncing  
on mailbox open).

But see Ticket #11590 - If not using Imap_Client's full caching, there  
is still an opportunity to take advantage of this.  Namely: creating a  
custom cache driver that has the known MODSEQ value that can be  
returned from it.  The mailbox will be sync'd on open, and the flag  
values can be cached in the custom cache driver so that  
SYNCFLAGUIDS/VANISHED doesn't need to hit the server again (the custom  
cache driver could be an in-memory cache).

I'm probably going to change the internals of Imap_Client soon so that  
all objects cache - if not given a cache parameter, than FETCH items  
are only cached for that page access.  However, this won't take  
advantage of the fact that you have a MODSEQ value/saved state before  
even connecting to the mailbox.





More information about the bugs mailing list