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).
A repository used for storing cached objects.
This is optional if Cache
is used inside a SpaDES module.
if using a database backend, drv must be an object that inherits from DBIDriver e.g., from package RSQLite, e.g., SQLite
an optional DBIConnection object, as returned by dbConnect().
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.
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
This is used for its side effects, namely, it will add the object to the cache and cache database.