Skip to contents

Returns (and creates on request) a per-user cache directory under tools::R_user_dir(). A cache directory serves one plan, so give each plan a directory of its own inside this one, as in file.path(scopus_cache_dir(), "my-plan"), and pass that as cache_dir to scopus_fetch_plan(). The cache is entirely optional, and scopus_cache_clear() removes it, every plan's directory included.

Usage

scopus_cache_dir(create = FALSE)

Arguments

create

Logical. When TRUE, the directory is created if it is absent.

Value

The cache directory path, invisibly when create = TRUE.

Examples

scopus_cache_dir(create = FALSE)
#> [1] "/home/runner/.cache/R/scopusflow"