By default, fivbvis starts with session-specific caching (equivalent to running v_caching(TRUE); v_cache_dir("session")).

v_caching(caching)

v_cache_dir(cache_dir)

Arguments

caching

logical or string: if TRUE, used cached results; if FALSE, no caching; if "refresh", refresh the cache

cache_dir

string: either

  • "session" - use a session-specific directory for caching, meaning that when R is closed and restarted, the cache will be cleared and a new one used

  • "user" - use a persistent, user-specific directory (as returned by user_data_dir

  • or a string giving a path to a specific directory to use. The directory must already exist

Value

The caching setting (for v_caching) or cache directory (for v_cache_dir) after applying any provided parameters

Examples

v_caching(TRUE) ## turn caching on v_caching(FALSE) ## turn caching off v_caching("refresh") ## contents in cache will be updated v_cache_dir() ## return current cache dir
#> [1] "/tmp/Rtmplbg5ld/file5e117ff073c9"
if (FALSE) { v_cache_dir("session") ## use per-session cache v_cache_dir("user") ## use persistent, user-specific cache v_cache_dir("c:/my/cache/dir") ## use specific dir }