makeCachedActiveBinding: makeCachedActiveBinding

View source: R/makeCachedActiveBinding.R

makeCachedActiveBindingR Documentation

makeCachedActiveBinding

Description

Like makeActiveBinding but the value of the active binding gets only evaluated once and is "remembered".

Usage

makeCachedActiveBinding(sym, fun, env = .GlobalEnv, verbose = FALSE)

Arguments

sym

See makeActiveBinding in the base package.

fun

See makeActiveBinding in the base package.

env

See makeActiveBinding in the base package.

verbose

Set to TRUE to see caching in action (useful for troubleshooting).

Examples

makeCachedActiveBinding("x", function() runif(1), verbose=TRUE)
x
x

Bioconductor/BiocFileCache documentation built on March 31, 2024, 11:23 p.m.