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)

Arguments

save_dir

Directory to save a file to.

recursive

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?

package

a character string giving the name of an R package

obj

R object.

save_path

File name to save to.

Value

Null.

Cache directory path.

Null.

Functions

  • 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.

Examples

if (FALSE) { # \dontrun{
cache_clear()
} # }
save_dir <- cache_dir
if (FALSE) { # \dontrun{
cache_files()
} # }
cache_save(mtcars, tempfile())
#> Caching file --> /tmp/RtmpqTsVtP/file15dbe4d3edfa7