[Qgis-user] refresh joined layers cache through python

Olivier Dalang olivier.dalang at gmail.com
Tue Mar 3 06:39:00 PST 2015


Dear List,

I'm using layers joins in my projects, and need to use the memory cache for
performance reasons.

This means that when I'm making changes on the joined layers, they won't
appear on the base layer until the project is reloaded.

Is there a way to trigger a refresh of the joined layer cache "manually"
through python ?

I looked at the API, but didn't find how to do so...

I found this class : *QgsVectorLayerJoinBuffer* which has a
*createJoinCaches* method, but I couldn't find how to get a reference to it
from the VectorLayer.

There's also the *createJoinCaches* method of *QgsVectorLayer*, but it seem
it has no effect if the cache was already created (and that's what the
docstring says as well).

If there's no way to do it, does anyone have a workaround, hopefully a bit
lighter than reloading the project ?

Thanks a lot !

Olivier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150303/e2cea261/attachment.html>


More information about the Qgis-user mailing list