Hi all, I have a small question regarding the caching mechanism in the current KDE 4.11 Nepomuk implementation.
In Conquirere I use Nepomuk as my data storage to show and manipulate the connections between the nfo:Document and nbib:* Nepomuk resources. This works like a charm and is blazing fast when I display available as well as new resources. Now Nepomuk added a caching mechanism, while I save the retrieved Nepomuk2::Resources to display them in my application. When I start to add changes and send them via Nepomuk2::setProperty I can observe the changes via the resourcewatcher. I do get the correct updates via: propertyChanged (const Nepomuk2::Resource &resource, const Nepomuk2::Types::Property &property, const QVariantList &addedValues, const QVariantList &removedValues) and I can see the updated property and its value, but the resource is still a cached one with its old values, even with several updates I won't get any changes in the Nepomuk2::Resources until I restart the application. I've seen there is a new method .setWatcherEnabled(true) but it does not seem to have the desired effect. In former versions I could get an updated Nepomuk2:Resource by using a QEventLoop loop; QTimer::singleShot( 1000, &loop, SLOT(quit()) ); loop.exec(); as mentioned in bug: 306108 this however does not seem to work anymore. Now the question. How is the design meant to work? Is it possible to force the update of Nepomuk resources without getting the cached ones? As of now even creating a new Nepomuk2::Resource based on the uri returns a cached one. Or is the Nepomuk storage design to be a fast lookup/search for existing data and I should rather copy the data into a local storage and update this via the propertyChanged signal from the ResourceWatcher? Any help with this is very appreciated, as I'm currently lost what the "best practice" in such a situation is. I like to avoid keeping my own database that pushes data to nepomuk the way akonadi is handling it with the mails/events. Kind Regards, Joerg _______________________________________________ Nepomuk mailing list [email protected] https://mail.kde.org/mailman/listinfo/nepomuk
