Skip to contents

Deletes all cached repository listings. Safe at any time – a cleared entry is simply re-fetched from the host's API the next time it is needed.

Usage

repo_info_cache_clear()

Value

the number of cache entries removed, invisibly

Details

With cache = TRUE, repo_check (and code_check and data_check, which pass it on), and the *_info() functions such as dryad_info() and zenodo_info(), store each repository's listing result (dataset metadata + file list) on disk and reuse it on a later call for the same repository, instead of re-querying the host's API. This is a SEPARATE cache from the downloaded-file-bytes cache (see repo_cache_dir()) – listing a repository and downloading its files are different costs, and a restart that has nothing new to download would otherwise still re-pay the full listing cost every time. A cached listing is not refreshed automatically; a published dataset's own metadata/file list rarely changes once public, but if a paper's repository has genuinely been updated, clear the cache with this function.

Examples

repo_info_cache_clear()