Skip to contents

tr_cache_dir() returns the path where cached API responses are stored. tr_cache_clear() clears all cached responses.

Usage

tr_cache_dir()

tr_cache_clear()

Value

tr_cache_dir() returns a string with the path to the cache directory.

tr_cache_clear() is called for its side effect of clearing the cached responses and returns NULL invisibly.

Details

The cache is only used when enabled with options(treasury.cache = TRUE). Cached responses are stored for 1 day by default, but this can be customized with options(treasury.cache_max_age = seconds).

Examples

tr_cache_dir()
#> [1] "/home/runner/.cache/R/treasury/httr2"