[Qgis-developer] refresh joined layers cache through python
Rouzaud Denis
denis.rouzaud at gmail.com
Sun Mar 8 11:32:32 PDT 2015
Hi,
There is a PR open for this
https://github.com/qgis/QGIS/pull/771 <https://github.com/qgis/QGIS/pull/771>
Open for quite a long time though.
Denis
> On 08 Mar 2015, at 18:54, Olivier Dalang <olivier.dalang at gmail.com> wrote:
>
> Dear List,
>
> I'm posting this to qgis-dev since I got no answer on qgis-user and it's a bit technical.
>
>
> 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
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150308/83bf6e32/attachment.html>
More information about the Qgis-developer
mailing list