Manage data caches
Details
To get the cache directory for a data source, see the method
x$cache_path_get()
cache_delete only accepts 1 file name, while
cache_delete_all doesn't accept any names, but deletes all files.
For deleting many specific files, use cache_delete in a lapply()
type call
Note that cached files will continue to be used until they are deleted. It's possible to run into problems when changes happen in your R setup. For example, at least one user reported changing versions of this package and running into problems because a cached data file from a previous version of rnoaa did not work with the newer version of rnoaa. You should occasionally delete all cached files.
Useful user functions
Assuming x is a HoardClient class object, e.g., lcd_cache
x$cache_path_get()get cache pathx$cache_path_set()set cache pathx$list()returns a character vector of full path file namesx$files()returns file objects with metadatax$details()returns files with detailsx$delete()delete specific filesx$delete_all()delete all files, returns nothing
Caching objects for each data source
isd()/isd_stations():isd_cachecpc_prcp():cpc_cachearc2():arc2_cachelcd():lcd_cachebsw():bsw_cacheersst():ersst_cachetornadoes():torn_cacheghcnd()/ghcnd_search():ghcnd_cachese_data()/se_files():stormevents_cache
See also
rnoaa_options() for managing whether you see messages
about cached files when you request data
