Create a new cache
Low level tools to work with Cache
createCache(
cachePath,
drv = getOption("reproducible.drv", RSQLite::SQLite()),
conn = getOption("reproducible.conn", NULL),
force = FALSE
)saveToCache(
cachePath,
drv = getOption("reproducible.drv", RSQLite::SQLite()),
conn = getOption("reproducible.conn", NULL),
obj,
userTags,
cacheId,
linkToCacheId = NULL
)
loadFromCache(
cachePath,
cacheId,
format = getOption("reproducible.cacheSaveFormat", "rds"),
drv = getOption("reproducible.drv", RSQLite::SQLite()),
conn = getOption("reproducible.conn", NULL)
)
rmFromCache(
cachePath,
cacheId,
drv = getOption("reproducible.drv", RSQLite::SQLite()),
conn = getOption("reproducible.conn", NULL),
format = getOption("reproducible.cacheSaveFormat", "rds")
)
A path describing the directory in which to create the database file(s)
A driver, passed to dbConnect
A '>DBIConnection object, as returned by
dbConnect()
.
Logical. Should it create a cache in the cachePath
,
even if it already exists, overwriting.
The R object to save to the cache
A character vector with descriptions of the Cache function call. These
will be added to the Cache so that this entry in the Cache can be found using
userTags
e.g., via showCache
.
The hash string representing the result of .robustDigest
Optional. If a cacheId
is provided here, then a file.link
will be made to the file with that cacheId
name in the cache repo.
This is used when identical outputs exist in the cache. This will save disk space.
The text string representing the file extension used normally by
different save formats; currently only "rds"
or "qs"
. Defaults
to getOption("reproducible.cacheSaveFormat", "rds")