Deletes 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.
clear_cache(..., disable = FALSE)NULL no return value, all effects are stored in the package
environment
Arguments passed on to set_cache
cache_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 is
EPIDATR_CACHE_DIR.
daysthe maximum length of time in days to keep any particular cached
call. By default this is 1. The environmental variable is
EPIDATR_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 is EPIDATR_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 is EPIDATR_CACHE_LOGFILE.
confirmwhether to confirm directory creation. default is TRUE;
should only be set in non-interactive scripts
startupindicates whether the function is being called on
startup. Affects suppressability of the messages. Default is FALSE.
instead of setting a new cache, disable caching entirely;
defaults to FALSE
set_cache to start a new cache (and general caching info),
disable_cache to only disable without deleting, and cache_info