<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Kolab backend: IMAP cache does not get updated</title> 
  <pubDate>Fri, 10 Apr 2026 04:21:42 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/11590</link> 
  <atom:link rel="self" type="application/rss+xml" title="Kolab backend: IMAP cache does not get updated" href="https://bugs.horde.org/ticket/11590/rss" /> 
  <description>Kolab backend: IMAP cache does not get updated</description> 
 
   
   
  <item> 
   <title>Hi,

I&#039;m currently crosstesting the horde 5 RC with anothe</title> 
   <description>Hi,

I&#039;m currently crosstesting the horde 5 RC with another Kolab client.
It looks like H5 does not see updates from the other client.

I created a new note in the other client and checked on the server that it&#039;s synced out.
mnemo of H5 will not see this new note. mnemo of horde -4- instantly sees this note.

When I delete all horde cashes, the note gets synced in.

Same behavior with nag. I suspect (read: untested) that another horde installation
accessing the same IMAP server will behave in the same way.


Cheers,
Thomas
</description> 
   <pubDate>Mon, 29 Oct 2012 15:47:00 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11590#t74148</link> 
  </item> 
   
  <item> 
   <title>I tried to bring back Jan&#039;s old hotfix for #11498,
(commit </title> 
   <description>I tried to bring back Jan&#039;s old hotfix for #11498,
(commit 5bc02b6acd8acc2024626d9d21ec2834609d7721, trigger sync if UID next changes)
though it didn&#039;t make a difference.
</description> 
   <pubDate>Wed, 31 Oct 2012 10:11:49 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11590#t74220</link> 
  </item> 
   
  <item> 
   <title>This is currently the expected behavior as the implemented s</title> 
   <description>This is currently the expected behavior as the implemented synchronization strategy is pretty dumb. The old code had no synchronization strategy and so it always synchronized the data on access. You should be able to go back to the old behavior by modifying Horde/Kolab/Storage/Synchronization.php. Add a &quot;if (false &amp;&amp; ...&quot; to both conditionals present in that file. Does that revert back to the expected behavior?

I lack a final plan concerning the synchronization strategy. The problem with the synchronization is that each list synchronization costs two IMAP calls (LIST and METADATA) and each data synchronization as well (STATUS and SEARCH - the latter identifies deleted messages).

Doing this type of synchronization with each and every data access keeps the data in sync always. But of course it is a performance drag. Especially if you build the calendar and have access to ten or twenty different folders. And most of the times this type of synchronization is not really necessary. What describe - concurrent access with two clients to the same folder - is not the default case after all. At least not for personal folders.

At some point I wanted to create the &quot;kolab&quot; Horde application to offer at least a &quot;Sync now&quot; button to provide the user with control over the synchronization strategy. This would put the user into control of the synchronization strategy, would avoid performance issues but would not be an improvement of usability. Probably there are better solutions.

Any suggestions?</description> 
   <pubDate>Wed, 31 Oct 2012 18:34:35 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11590#t74253</link> 
  </item> 
   
  <item> 
   <title>&gt; This is currently the expected behavior as the implemented</title> 
   <description>&gt; This is currently the expected behavior as the implemented 
&gt; synchronization strategy is pretty dumb. The old code had no 
&gt; synchronization strategy and so it always synchronized the data on 
&gt; access. You should be able to go back to the old behavior by 
&gt; modifying Horde/Kolab/Storage/Synchronization.php. Add a &quot;if (false 
&gt; &amp;&amp; ...&quot; to both conditionals present in that file. Does that revert 
&gt; back to the expected behavior?
&gt;
&gt; I lack a final plan concerning the synchronization strategy. The 
&gt; problem with the synchronization is that each list synchronization 
&gt; costs two IMAP calls (LIST and METADATA) and each data 
&gt; synchronization as well (STATUS and SEARCH - the latter identifies 
&gt; deleted messages).
&gt;
&gt; Doing this type of synchronization with each and every data access 
&gt; keeps the data in sync always. But of course it is a performance 
&gt; drag. Especially if you build the calendar and have access to ten or 
&gt; twenty different folders. And most of the times this type of 
&gt; synchronization is not really necessary. What describe - concurrent 
&gt; access with two clients to the same folder - is not the default case 
&gt; after all. At least not for personal folders.
&gt;
&gt; At some point I wanted to create the &quot;kolab&quot; Horde application to 
&gt; offer at least a &quot;Sync now&quot; button to provide the user with control 
&gt; over the synchronization strategy. This would put the user into 
&gt; control of the synchronization strategy, would avoid performance 
&gt; issues but would not be an improvement of usability. Probably there 
&gt; are better solutions.
&gt;
&gt; Any suggestions?

At least when using Horde_Imap_Client we can leverage from the IMAP server&#039;s feedback whether the cache needs updating.</description> 
   <pubDate>Wed, 31 Oct 2012 19:03:52 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11590#t74263</link> 
  </item> 
   
  <item> 
   <title>&gt; I lack a final plan concerning the synchronization strateg</title> 
   <description>&gt; I lack a final plan concerning the synchronization strategy. The 
&gt; problem with the synchronization is that each list synchronization 
&gt; costs two IMAP calls (LIST and METADATA) and each data 
&gt; synchronization as well (STATUS and SEARCH - the latter identifies 
&gt; deleted messages).

Any reason you are not using CONDSTORE/QRESYNC if it is available?  QRESYNC solves the last issue entirely (and CONDSTORE solves the last issue transparently within the Imap driver).  However, a cache backend is needed to use these.

Given the activesync may use MODSEQs also without using a cache driver, it may be useful to allow a MODSEQ to be explicitly given to the openMailbox command.  Although this has major drawbacks, since openMailbox() is called extensively within the IMAP driver itself so a mailbox may already be open by the time a MODSEQ can be provided.

A better option might be to create a custom cache driver to pass to the IMAP driver.</description> 
   <pubDate>Wed, 31 Oct 2012 19:05:20 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11590#t74264</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; I lack a final plan concerning the synchronization strate</title> 
   <description>&gt;&gt; I lack a final plan concerning the synchronization strategy. The
&gt;&gt; problem with the synchronization is that each list synchronization
&gt;&gt; costs two IMAP calls (LIST and METADATA) and each data
&gt;&gt; synchronization as well (STATUS and SEARCH - the latter identifies
&gt;&gt; deleted messages).
&gt;
&gt; Any reason you are not using CONDSTORE/QRESYNC if it is available?

No. I planned to use these but never found the time to actually get into this and write the necessary code. What you write sounds however as if this would avoid even more IMAP calls than I expected. My assumption was that CONDSTORE would allow me to reduce the two IMAP calls in each situation to a single one. If there is even more to be gained here then this makes implementing this even more attractive.
  
&gt; QRESYNC solves the last issue entirely (and CONDSTORE solves the last 
&gt; issue transparently within the Imap driver).  However, a cache 
&gt; backend is needed to use these.
&gt;
&gt; Given the activesync may use MODSEQs also without using a cache 
&gt; driver, it may be useful to allow a MODSEQ to be explicitly given to 
&gt; the openMailbox command.  Although this has major drawbacks, since 
&gt; openMailbox() is called extensively within the IMAP driver itself so 
&gt; a mailbox may already be open by the time a MODSEQ can be provided.
&gt;
&gt; A better option might be to create a custom cache driver to pass to 
&gt; the IMAP driver.
</description> 
   <pubDate>Wed, 31 Oct 2012 19:34:24 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11590#t74266</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; Any reason you are not using CONDSTORE/QRESYNC if it is a</title> 
   <description>&gt;&gt; Any reason you are not using CONDSTORE/QRESYNC if it is available?
&gt;
&gt; No. I planned to use these but never found the time to actually get 
&gt; into this and write the necessary code. What you write sounds however 
&gt; as if this would avoid even more IMAP calls than I expected. My 
&gt; assumption was that CONDSTORE would allow me to reduce the two IMAP 
&gt; calls in each situation to a single one.

This is not entirely correct.  A bit of explanation is probably necessary.

In short, without additional IMAP calls CONDSTORE can only tell you whether a mailbox has changed from a previous state.  If caching on the local host, it still requires two separate IMAP calls (one to check for flag changes, one to check for deleted messages) to determine what has changed.  Further, things may have changed in the mailbox that you don&#039;t care about (i.e. UIDs not visible), but CONDSTORE won&#039;t provide you this information.  CONDSTORE will, however, allow you to forgo additional mailbox sync calls if the mod sequence value hasn&#039;t changed since the last access - thus, if the mailbox hasn&#039;t changed, you won&#039;t need to issue those 2 additional IMAP calls.

If a client does its homework before opening a mailbox, QRESYNC instead allows the local cache to be updated without *any* further IMAP call (at the expense of a more involved SELECT/EXAMINE command) - all sync information is passed as untagged responses in the SELECT/EXAMINE return.</description> 
   <pubDate>Wed, 31 Oct 2012 21:27:38 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11590#t74271</link> 
  </item> 
   
  <item> 
   <title>&gt; This is currently the expected behavior as the implemented</title> 
   <description>&gt; This is currently the expected behavior as the implemented 
&gt; synchronization strategy is pretty dumb. The old code had no 
&gt; synchronization strategy and so it always synchronized the data on 
&gt; access. You should be able to go back to the old behavior by 
&gt; modifying Horde/Kolab/Storage/Synchronization.php. Add a &quot;if (false 
&gt; &amp;&amp; ...&quot; to both conditionals present in that file. Does that revert 
&gt; back to the expected behavior?

Ok, I understand why the old behavior is inappropriate for many folders &quot;subscribed&quot; at the same time. The new strategy is quite a change to H4, we probably should have mentioned it in the changelog.

&gt; I lack a final plan concerning the synchronization strategy

For plain dumb IMAP, what about syncing the folders every XX minutes (+ random threshold to distribute the server load a bit better)? Also on login and folder &quot;subscribe&quot;.
The sync time should be user configurable, may be 5 minutes as default.

&gt; What describe - concurrent access with two clients to the same folder - is not the default case after all. At least not for personal folders.

For the &quot;groupware&quot; case it&#039;s the default. For example a secretary managing appointments for another person. 
</description> 
   <pubDate>Mon, 05 Nov 2012 15:57:31 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11590#t74399</link> 
  </item> 
   
  <item> 
   <title>&gt; You should be able to go back to the old behavior by 
&gt; m</title> 
   <description>&gt; You should be able to go back to the old behavior by 
&gt; modifying Horde/Kolab/Storage/Synchronization.php. Add a &quot;if (false 
&gt; &amp;&amp; ...&quot; to both conditionals present in that file. Does that revert 
&gt; back to the expected behavior?

That -almost- worked out: It slows down to a crawl :o) It looks like all Kolab shares are synced on every click. That&#039;s slow for sure. It would be nice if it just syncs the shares of the currently active application. Though I consider this a workaround compared with my previously mentioned strategy.
</description> 
   <pubDate>Mon, 05 Nov 2012 16:31:13 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11590#t74403</link> 
  </item> 
   
  <item> 
   <title>I&#039;ll point you to this commit:

http://git.horde.org/horde</title> 
   <description>I&#039;ll point you to this commit:

http://git.horde.org/horde-git/-/commit/303efdcb9b58a4c65520ce8939e5c8f3772c75fc

This (or something similar) will be a part of Horde_Imap_Client 2.2.0.  The combo of getSyncToken()/sync() should provide the necessary information on whether the mailbox has changed.  Not sure exactly what information you are caching, but most likely this function pair will help out at least a bit.</description> 
   <pubDate>Wed, 07 Nov 2012 03:36:08 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11590#t74530</link> 
  </item> 
   
  <item> 
   <title>I&#039;ve implemented a basic strategy to sync the folder data at</title> 
   <description>I&#039;ve implemented a basic strategy to sync the folder data at least every XX minutes.
Please see the attached patch. Right now the config values are constants in the class.
Jan agreed to make these configurable if needed.

The folder -list- is synced on login only. I need further testing if a similar strategy can be implemented here without much performance penalty.
</description> 
   <pubDate>Wed, 07 Nov 2012 17:16:38 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11590#t74575</link> 
  </item> 
   
  <item> 
   <title>Here&#039;s a patch to update the unit test, too.
</title> 
   <description>Here&#039;s a patch to update the unit test, too.
</description> 
   <pubDate>Fri, 09 Nov 2012 09:55:16 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11590#t74638</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git (master):

commit 66955b963bd3</title> 
   <description>Changes have been made in Git (master):

commit 66955b963bd3f85ddf712ca49a06784bc8811e93
Author: Gunnar Wrobel &lt;p@rdus.de&gt;
Date:   Wed Nov 21 09:09:15 2012 +0100

    Add a time based synchronization strategy. Bug #11590.
    
    This is only part of the job. Horde/Kolab/Storage/Factory.php now still needs to bridge the configuration and the selection of the matching strategy.

 .../lib/Horde/Kolab/Storage/Synchronization.php    |   37 +++--
 .../Storage/Synchronization/OncePerSession.php     |   67 +++++++++
 .../Kolab/Storage/Synchronization/TimeBased.php    |  115 ++++++++++++++++
 .../Unit/Synchronization/OncePerSessionTest.php    |  131 ++++++++++++++++++
 .../Storage/Unit/Synchronization/TimeBasedTest.php |  145 ++++++++++++++++++++
 5 files changed, 481 insertions(+), 14 deletions(-)

http://git.horde.org/horde-git/-/commit/66955b963bd3f85ddf712ca49a06784bc8811e93</description> 
   <pubDate>Thu, 22 Nov 2012 19:24:17 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11590#t74985</link> 
  </item> 
   
  <item> 
   <title>Thanks for the patch. I don&#039;t think the &quot;Sync once per sessi</title> 
   <description>Thanks for the patch. I don&#039;t think the &quot;Sync once per session&quot; strategy is completely wrong though and makes sense in situations where Horde is the primary Kolab client and there is no synchronization with other clients necessary. So I did not want to simply overwrite it with the new time based strategy. Instead I added both. As discussed here there should probably additional strategies in the future that would rely on advanced IMAP features.

The time-based strategy holds the core of your patch now. I only removed the &quot;protection against clock jumps&quot;. If you are logged in to a server where the clock suddenly jumps backward the missing synchronization with other Kolab clients is the least of my worries ;) -&gt; simply log out and you are fine again.

What is missing now is the selection (and potential configuration) of the strategy within Horde/Kolab/Storage/Factory.php. In the long run I would probably prefer to have a Kolab specific user preference.   For now I guess it should be server-wide based on a configuration value though. Can you prepare such a patch?</description> 
   <pubDate>Thu, 22 Nov 2012 20:25:19 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11590#t74994</link> 
  </item> 
   
  <item> 
   <title>&gt; I don&#039;t think the &quot;Sync once per session&quot; 
&gt; strategy is </title> 
   <description>&gt; I don&#039;t think the &quot;Sync once per session&quot; 
&gt; strategy is completely wrong though and makes sense in situations 
&gt; where Horde is the primary Kolab client and there is no 
&gt; synchronization with other clients necessary.

Synchronization with other clients doesn&#039;t imply synchronization with other users :)
Even if Horde is the only client, I still want to see updates to shared calendars, f.e. a company wide calendar.

-&gt; I still opt for the time based sync by default.
</description> 
   <pubDate>Fri, 23 Nov 2012 13:39:07 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11590#t75008</link> 
  </item> 
   
  <item> 
   <title>ping Gunnar :)</title> 
   <description>ping Gunnar :)</description> 
   <pubDate>Thu, 25 Jul 2013 15:24:58 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11590#t79600</link> 
  </item> 
   
  <item> 
   <title>This should really be implemented using synchronization feat</title> 
   <description>This should really be implemented using synchronization features of Horde_Imap_Client.</description> 
   <pubDate>Tue, 27 Aug 2013 10:50:15 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11590#t80404</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
