[QGIS-Developer] Invalidating a QgsImageCache entry

Nyall Dawson nyall.dawson at gmail.com
Wed Apr 16 15:28:21 PDT 2025


On Thu, 17 Apr 2025 at 06:01, Michael Schmuki via QGIS-Developer
<qgis-developer at lists.osgeo.org> wrote:
>
> Hi QGIS Devs
>
> I have tried to add an image decorator to the map canvas, with a .png
> that gets automatically re-generated by some logic in the project
> Python macro.
>
> Then I found out that QgsDecorationImage uses the app wide
> QgsImageCache and won't get updated until the
> "FileModifiedCheckTimeout" in the QgsImageCache of 30s has occurred.
>
> I see no way to manually invalidate a cache entry (Python and C++) and
> wanted to ask if there is a reason behind this, or if I'm missing
> something.

No, there's currently no methods exposed to do this.

Nyall


More information about the QGIS-Developer mailing list