Learn R Programming

reproducible (version 3.2.1)

showCacheCloud: List and read all cloud cache metadata (dbFile) files

Description

Downloads every per-cacheId metadata file (the small .dbFile.* files) from the cloud cache folder, loads them, and rbindlists them into a single cache data.table with the same shape as showCache(). This is what allows showSimilar to compare the current call against artifacts cached by other machines sharing the same cloudFolderID, not just those cached locally.

Usage

showCacheCloud(
  cloudFolderID,
  cachePath,
  existingCacheIds = character(),
  drv = getDrv(getOption("reproducible.drv", NULL)),
  conn = getOption("reproducible.conn", NULL),
  verbose = getOption("reproducible.verbose")
)

Value

A cache data.table (possibly empty) of cloud-only metadata.

Arguments

cloudFolderID

A googledrive dribble of a folder, e.g., using drive_mkdir(). If left as NULL, the function will create a cloud folder with name from last two folder levels of the cachePath path, : paste0(basename(dirname(cachePath)), "_", basename(cachePath)). This cloudFolderID will be added to options("reproducible.cloudFolderID"), but this will not persist across sessions. If this is a character string, it will treat this as a folder name to create or use on GoogleDrive.

cachePath

A repository used for storing cached objects. This is optional if Cache is used inside a SpaDES module.

existingCacheIds

Character vector of cacheIds already known locally; their cloud metadata is skipped.

drv

If using a database backend, drv must be an object that inherits from DBIDriver (e.g., RSQLite::SQLite).

conn

an optional DBIConnection object, as returned by dbConnect().

verbose

Numeric, -1 silent (where possible), 0 being very quiet, 1 showing more messaging, 2 being more messaging, etc. Default is 1. Above 3 will output much more information about the internals of Caching, which may help diagnose Caching challenges. Can set globally with an option, e.g., options('reproducible.verbose' = 0) to reduce to minimal

Details

The full object files are never fetched -- only the small metadata files -- and any cacheId already present in existingCacheIds is skipped, so locally-known artifacts do not pay for a re-download.