saveToCache {reproducible} | R Documentation |
Save an object to Cache
Description
This is not expected to be used by a user as it requires that the cacheId
be
calculated in exactly the same as it calculated inside Cache
(which requires match.call
to match arguments with their names, among other things).
Usage
saveToCache(
cachePath = getOption("reproducible.cachePath"),
drv = getDrv(getOption("reproducible.drv", NULL)),
conn = getOption("reproducible.conn", NULL),
obj,
userTags,
cacheId,
linkToCacheId = NULL,
verbose = getOption("reproducible.verbose")
)
Arguments
cachePath |
A repository used for storing cached objects.
This is optional if |
drv |
if using a database backend, drv must be an object that inherits from DBIDriver e.g., from package RSQLite, e.g., SQLite |
conn |
an optional DBIConnection object, as returned by dbConnect(). |
obj |
The R object to save to the cache |
userTags |
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
|
cacheId |
The hash string representing the result of |
linkToCacheId |
Optional. If a |
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., |
Value
This is used for its side effects, namely, it will add the object to the cache and cache database.