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")
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 string giving the name of an R package
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/RtmpqTsVtP/file15dbe4d3edfa7