datasus_cache_dir: Resolve the datasusr cache directory

View source: R/datasus_catalog.R

datasus_cache_dirR Documentation

Resolve the datasusr cache directory

Description

Returns the active cache directory path. Checks, in order: the cache_dir argument, the DATASUSR_CACHE_DIR environment variable, the datasusr.cache_dir option, and finally a session-scoped subdirectory of tempdir(). To opt in to a persistent cache across sessions, set the DATASUSR_CACHE_DIR environment variable, the datasusr.cache_dir option, or pass cache_dir explicitly (for example, tools::R_user_dir("datasusr", "cache")).

Usage

datasus_cache_dir(cache_dir = NULL)

Arguments

cache_dir

Optional cache directory supplied by the caller.

Value

A single path string.

Examples

datasus_cache_dir()

datasusr documentation built on Sept. 26, 2026, 1:08 a.m.