[Kde-pim] [PATCH] clear payload

Tobias Koenig tokoe at kde.org
Sat Feb 27 10:06:09 GMT 2010


Hej,

during the development of the DAV groupware resource we came across
another issue in Akonadi that needs to be fixed.
To keep the Akonadi cache up-to-date with the backend we do polling
via the cache policy mechanism of Akonadi. So when Resource::retrieveItems()
is called, we download the etags of all items from the backend and check
whether a remote item has another etag than our local one, which implies
that we have to refetch its content.
To nicely integrate the refetch into the existing work flow of the Akonadi
resource framework, we somehow have to clear the payload parts of this item,
so that on the next access to that item through an application, Resource::retrieveItem()
is called automatically.

The attached patch adds the new method Item::clearPayload() to the Akonadi::Item class,
which is intented to be used for this purpose and adapts the Akonadi server to understand
the INVALIDATECACHE command.

Ok to commit?

Ciao,
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: akonadi_libs_clearpayload.patch
Type: text/x-diff
Size: 2440 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20100227/4a20f525/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: akonadi_server_clearpayload.patch
Type: text/x-diff
Size: 4936 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20100227/4a20f525/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20100227/4a20f525/attachment.sig>
-------------- next part --------------
_______________________________________________
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