| gb_clear_cache | R Documentation |
Use this function with caution. It clears cached archives and
configuration by deleting the geobounds configuration directory
returned by tools::R_user_dir(), deleting the active cache directory and
clearing the GEOBOUNDS_CACHE_DIR environment variable. See
base::Sys.getenv().
gb_clear_cache(config = FALSE, cached_data = TRUE, quiet = TRUE)
config |
A logical value. If |
cached_data |
A logical value. If |
quiet |
A logical value. If |
This reset restores the cache state of a fresh geobounds
installation. For safety, the function refuses to recursively delete a cache
path that contains the home, working, temporary or package configuration
directory. Use a dedicated cache subdirectory.
Inspect the active directory with gb_detect_cache_dir() before clearing
it. Use gb_set_cache_dir() to configure a cache directory again.
Invisibly returns NULL. This function is called for its side effects.
Cache management functions:
gb_detect_cache_dir(),
gb_set_cache_dir()
# Caution: this may modify your current state.
## Not run:
my_cache <- gb_detect_cache_dir()
# Set an example cache directory.
ex <- file.path(tempdir(), "example", "cache")
gb_set_cache_dir(ex, quiet = TRUE)
gb_clear_cache(quiet = FALSE)
# Restore the initial cache.
gb_set_cache_dir(my_cache)
identical(my_cache, gb_detect_cache_dir())
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.