OlivierBinette / cache

Easily cache and retrieve computation results in R
Other
6 stars 1 forks source link

Add dependencies option #2

Open OlivierBinette opened 3 years ago

OlivierBinette commented 3 years ago

Add option .depends to list cache dependencies.

Example:

# variable `z` should be recomputed whenever `list(x, y)` *evaluates* to something new in the parent environment.
x = 1
y = 2
cache(.depends = list(x, y),
 z = x + y
)