Use this function with caution. This function will clear your cached data and configuration, specifically:
Deletes the geobounds config directory (
tools::R_user_dir("geobounds", "config")).Deletes the
cache_dirdirectory.Deletes the values stored in
Sys.getenv("GEOBOUNDS_CACHE_DIR").
Value
invisible() This function is called for its side effects.
Details
This is a comprehensive reset function that is intended to reset your status as if you had never installed or used geobounds.
See also
Other cache utilities:
gb_detect_cache_dir(),
gb_set_cache_dir()
Examples
# Caution! This may modify your current state
# \dontrun{
my_cache <- gb_detect_cache_dir()
#> ℹ C:\Users\RUNNER~1\AppData\Local\Temp\RtmpaMSHV8/geobounds
# Set an example cache
ex <- file.path(tempdir(), "example", "cache")
gb_set_cache_dir(ex, quiet = TRUE)
gb_clear_cache(quiet = FALSE)
#> ! geobounds data deleted: C:\Users\RUNNER~1\AppData\Local\Temp\RtmpaMSHV8/example/cache
# Restore initial cache
gb_set_cache_dir(my_cache)
#> ✔ geobounds cache dir is C:\Users\RUNNER~1\AppData\Local\Temp\RtmpaMSHV8/geobounds.
#> ℹ To install your `cache_dir` path for use in future sessions run this function with `install = TRUE`.
identical(my_cache, gb_detect_cache_dir())
#> ℹ C:\Users\RUNNER~1\AppData\Local\Temp\RtmpaMSHV8/geobounds
#> [1] TRUE
# }
