GDAL raster cache works in one process for any thread in that process. It
is not shared among different processes.
See that reading simultaneously from the same dataset object in different
threads many corrupt your cache. Do not do that!

On Mon, 17 Feb 2025 at 17:38, Rami DV via gdal-dev <gdal-dev@lists.osgeo.org>
wrote:

> Hello gdal-dev!
>
> Please forgive me for the newbie question, I am just now starting to
> develop more deeply with GDAL rather than just using the command line
> programs.
>
> I'm writing a program which opens a GDAL Tile Index from various different
> threads & processes, and I would like to keep an LRU cache of the blocks
> which are accessed, to speed up performance.
>
> From what I understand reading the GDALRasterBlock docs, GDAL keeps a
> global raster cache of the latest blocks accessed. But what I'm not sure,
> is if that cache is global within a particular thread/process, or if it's
> global across all threads/processes.
>
> So, these are the questions: does GDAL cache work across
> threads/processes? Any tips on doing global caching other than rolling my
> own outside of GDAL?
>
> Thanks in advance for the help & for the great software!
> Rami
> _______________________________________________
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to