Learn R Programming

mongolstats (version 0.1.1)

nso_cache_enable: Enable or configure caching

Description

Caches table lists and codebooks on disk to speed up repeated calls. Optionally set a time-to-live (TTL) for cache entries.

Usage

nso_cache_enable(dir = NULL, ttl = NULL)

Value

Cache directory path (invisibly).

Arguments

dir

Directory for cache; defaults to user cache dir.

ttl

Optional TTL in seconds for cached entries (applies to the disk cache). If NULL, entries persist until cleared.

Examples

Run this code
# Enable caching in a temporary directory (for demo purposes)
cache_dir <- nso_cache_enable(dir = tempdir())

# Check status
nso_cache_status()

# Disable when done
nso_cache_disable()

Run the code above in your browser using DataLab