<div dir="ltr"><div>GDAL raster cache works in one process for any thread in that process. It is not shared among different processes.</div><div>See that reading simultaneously from the same dataset object in different threads many corrupt your cache. Do not do that!</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, 17 Feb 2025 at 17:38, Rami DV via gdal-dev <<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">Hello gdal-dev!<div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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?</div><div><br></div><div>Thanks in advance for the help & for the great software!</div><div>Rami</div></div>
</div></div>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div>