This is a generic definition that can be extended according to class.

.cacheMessage(
  object,
  functionName,
  fromMemoise = getOption("reproducible.useMemoise", TRUE),
  verbose = getOption("reproducible.verbose", 1)
)

# S4 method for ANY
.cacheMessage(
  object,
  functionName,
  fromMemoise = getOption("reproducible.useMemoise", TRUE),
  verbose = getOption("reproducible.verbose", 1)
)

Arguments

object

Any R object.

functionName

A character string indicating the function name

fromMemoise

Logical. If TRUE, the message will be about recovery from memoised copy

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

Value

Nothing; called for its messaging side effect.

Author

Eliot McIntire

Examples

a <- 1
.cacheMessage(a, "mean")
#>      loaded cached result from previous mean call (and added a memoised copy)