Use this function with caution. It clears your cached data and configuration, specifically:
Deletes the giscoR config directory (
tools::R_user_dir("giscoR", "config")).Deletes the
cache_dirdirectory.Deletes the value stored in
Sys.getenv("GISCO_CACHE_DIR").
Arguments
- config
If
TRUE, delete the configuration folder of giscoR.- cached_data
If
TRUE, delete yourcache_dirand all its content.- verbose
A logical value indicating whether to display informational messages.
Details
Fully resets your cache state as if you had never installed or used giscoR.
See also
Cache management utilities:
gisco_set_cache_dir()
Examples
# Do not run this. It modifies your current state.
# \dontrun{
my_cache <- gisco_detect_cache_dir()
#> ℹ /tmp/RtmpmpngxH/giscoR
# Set an example cache.
ex <- file.path(tempdir(), "example", "cache")
gisco_set_cache_dir(ex, verbose = FALSE)
# Restore the initial cache.
gisco_clear_cache(verbose = TRUE)
#> ! Deleted giscoR data: /tmp/RtmpmpngxH/example/cache (0 bytes).
gisco_set_cache_dir(my_cache)
#> ℹ giscoR cache directory is /tmp/RtmpmpngxH/giscoR.
#> ℹ To install your `cache_dir` path for future sessions, run this function with `install` = TRUE.
identical(my_cache, gisco_detect_cache_dir())
#> ℹ /tmp/RtmpmpngxH/giscoR
#> [1] TRUE
# }
