Provides an interface to adjust hydrogeofetch `memoise` cache.

Mode and timeout can also be set using environment variables. `HYDROGEOFETCH_MEMOISE_CACHE` and `HYDROGEOFETCH_MEMOISE_TIMEOUT` are used unless overridden with this function. The old `NHDPLUSTOOLS_*` names are still recognized as a fallback.

The default mode is 'memory', so cached responses live only as long as the R session. Set 'filesystem' to persist them in hydrogeofetch_data_dir, and see hydrogeofetch_cache_clear to remove them again.

hydrogeofetch_cache_settings(mode = NULL, timeout = NULL)

Arguments

mode

character 'memory' (default) or 'filesystem'

timeout

numeric number of seconds until caches invalidate

Value

list containing settings at time of calling. If inputs are NULL, current settings. If settings are altered, previous setting values.