you could also call gdal.SetConfigOption('GDAL_CACHEMAX', string), but you need
to do that *before* reading any raster in the process (or any call to
gdal.SetCacheMax/GetCacheMax), otherwise it will be ignored.
Thanks! ...Later: How to use it? It doesn't seem to work for me:
~~~
>>> gdal.GetCacheMax()
4294967296
>>> gdal.SetCacheMax(0)
>>> gdal.GetCacheMax()
0
>>> gdal.SetConfigOption('GDAL_CACHEMAX','50%')
>>> gdal.GetCacheMax()
0
>>> gdal.SetConfigOption('GDAL_CACHEMAX','500')
>>> gdal.GetCacheMax()
0
>>> gdal.VersionInfo()
'3020200
~~~
Python 3.8.8 (default, Feb 24 2021, 15:54:32) on Windows (64 bits).
-Matt
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev