Manually reset the cache, deleting all currently saved data and starting afresh
Source:R/cache.R
clear_cache.RdDeletes the current cache and resets a new cache. Deletes local data! If you
are using a session unique cache, the previous settings will be reused. If
you pass in new set_cache arguments, they will take precedence over the
previous settings.
Arguments
- ...
Arguments passed on to
set_cachecache_dirthe directory in which the cache is stored. By default, this is
rappdirs::user_cache_dir("R", version = "epidatr"). The path can be either relative or absolute. The environmental variable isEPIDATR_CACHE_DIR.daysthe maximum length of time in days to keep any particular cached call. By default this is
1. The environmental variable isEPIDATR_CACHE_MAX_AGE_DAYS.max_sizethe size of the entire cache, in MB, at which to start pruning entries. By default this is
1024, or 1GB. The environmental variable isEPIDATR_CACHE_MAX_SIZE_MB.logfilewhere cachem's log of transactions is stored, relative to the cache directory. By default, it is
"logfile.txt". The environmental variable isEPIDATR_CACHE_LOGFILE.confirmwhether to confirm directory creation. default is
TRUE; should only be set in non-interactive scriptsstartupindicates whether the function is being called on startup. Affects suppressability of the messages. Default is
FALSE.
- disable
instead of setting a new cache, disable caching entirely; defaults to
FALSE
Value
NULL no return value, all effects are stored in the package
environment
See also
set_cache to start a new cache (and general caching info),
disable_cache to only disable without deleting, and cache_info