set_cache_max()
sets the maximum amount of memory that GDAL is permitted
to use for GDALRasterBlock caching.
The unit of the value to set is bytes. Wrapper of GDALSetCacheMax64()
.
Note
This function will not make any attempt to check the consistency of the passed value with the effective capabilities of the OS.
It is recommended to consult the documentation for get_cache_max()
and
get_cache_used()
before using this function.
Examples
(cachemax <- get_cache_max("bytes"))
#> integer64
#> [1] 838338355
set_cache_max(1e8)
get_cache_max() # returns in MB by default
#> integer64
#> [1] 100
# reset to original
set_cache_max(cachemax)
get_cache_max()
#> integer64
#> [1] 838