[Kde-pim] Collection sync timer

Martin Klapetek martin.klapetek at gmail.com
Thu Apr 11 12:10:47 BST 2013


On Thu, Apr 11, 2013 at 9:37 AM, Kevin Krammer <krammer at kde.org> wrote:

> On Wednesday, 2013-04-10, Martin Klapetek wrote:
> > Hi,
> >
> > is there a way to set a particular collection to sync automatically at a
> > given interval or should I add my own QTimer into the resource? This is
> for
> > the facebook resource to periodically check for new notifications.
>
> Akonadi::CachePolicy::setIntervalCheckItem()
> Akonadi::Collection::setCachePolicy
>

Hmm...the docs for this say:

"An optional time interval for regular collection sync (aka interval mail
check).

Synching means fetching updates from the Akonadi database. The cache policy
does not affect updates of the Akonadi database from the backend,"

Which also seems to be the case for me - the collection is never synced
from the server. Unless I missed something :)

  Akonadi::CachePolicy cachePolicy;
  cachePolicy.setIntervalCheckTime(7);
  cachePolicy.setCacheTimeout(7);

  notifications.setCachePolicy(cachePolicy);

...did I?

Cheers
-- 
Martin Klapetek | KDE Developer
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list