[Gdal-dev] gdal cache

Frank Warmerdam warmerdam at pobox.com
Wed Oct 13 11:45:40 EDT 2004


Gillian Walter wrote:
> Hi,
> 
> Is there any way to force gdal to flush its read cache? I've looked at
> the dataset and raster band FlushCache methods, but they just seem to
> write out any changes that have been made via gdal.  I am wondering if
> there is any way to tell gdal that an external application has altered a
> dataset.

Gillian,

The GDALRasterBand::FlushBlock() method will write out the block data if
the block is dirty (altered in memory since reading from disk), and then
it does "delete poBlock" which removes the block from the cache and recovers
the memory.

So, normal flushing should also get rid of the readcached block information.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list