Learn R Programming

PubChemR (version 3.0.0)

pc_cache_clear: Clear PubChemR Request Cache

Description

Clears request cache entries stored in memory and/or on disk.

Usage

pc_cache_clear(cache_dir = NULL, memory = TRUE, disk = TRUE)

Value

Invisibly returns `TRUE`.

Arguments

cache_dir

Cache directory. If `NULL`, uses configured cache directory.

memory

Logical; clear in-memory cache.

disk

Logical; clear on-disk cache.

Details

Use this helper before reproducible reruns or after changing transport settings when you want to avoid stale cached responses.

Examples

Run this code
tmp_dir <- tempdir()
pc_cache_info(cache_dir = tmp_dir)
pc_cache_clear(cache_dir = tmp_dir, memory = TRUE, disk = FALSE)
pc_cache_info(cache_dir = tmp_dir)

Run the code above in your browser using DataLab