Functions to cache objects in order to speed up processes the second time.
cache_clear(save_dir = cache_dir(), recursive = TRUE, ...)
cache_dir(package = "KGExplorer", subdir = NULL)
cache_files(save_dir = cache_dir(), recursive = TRUE, ...)
cache_save(obj, save_path)
Directory to save a file to.
logical. Should directories be deleted recursively?
Arguments passed on to base::unlink
, base::unlink
x
a character vector with the names of the file(s) or directories to be deleted.
force
logical. Should permissions be changed (if possible) to allow the file or directory to be removed?
expand
logical. Should wildcards (see ‘Details’ below) and
tilde (see path.expand
) be expanded?
a character vector giving the package(s) to look
in for data sets, or NULL
.
By default, all packages in the search path are used, then
the data
subdirectory (if present) of the current working
directory.
Subdirectory path to search for Monarch files within
domain
.
R object.
File name to save to.
Null.
Cache directory path.
Null.
cache_clear()
: cache_
Clear cache
Remove all data cached by the R package.
cache_dir()
: cache_
Cache directory
Provides the path to the package-wide cache directory.
cache_files()
: cache_
List cache
List all data cached by the R package.
cache_save()
: cache_
Save cache.
if (FALSE) { # \dontrun{
cache_clear()
} # }
save_dir <- cache_dir
if (FALSE) { # \dontrun{
cache_files()
} # }
cache_save(mtcars, tempfile())
#> Caching file --> /tmp/RtmpgTHNxl/file49735e647a0c