SpaDES (version 1.1.4)

cache: Cache method for simList class objects

Description

Because the simList has an environment as one of its slots, the caching mechanism of the archivist package does not work. Here, we make a slight tweak to the cache function. Specifically, we remove all elements that have an environment as part of their attributes. This is generally functions that are loaded from the modules, but also the .envir slot in the simList. Thus, only non-function objects are used as part of the digest call in the digest package (used internally in the cache function).

Usage

cache(cacheRepo = NULL, FUN, ..., notOlderThan = NULL)

## S3 method for class 'ANY': cache(cacheRepo = NULL, FUN, ..., notOlderThan = NULL)

Arguments

cacheRepo
A repository used for storing cached objects.
FUN
A function to be called.
...
Arguments of FUN function .
notOlderThan
load an artifact from the database only if it was created after notOlderThan.

Value

See Also

cache.