forget: Forget past results. Resets the cache of a memoised function.

Description Usage Arguments See Also Examples

View source: R/memoise.R

Description

Forget past results. Resets the cache of a memoised function.

Usage

1
forget(f)

Arguments

f

memoised function

See Also

memoise, is.memoised

Examples

1
2
3
4
5
6
memX <- memoise(function() { Sys.sleep(1); runif(1) })
# The forget() function
system.time(print(memX()))
system.time(print(memX()))
forget(memX)
system.time(print(memX()))

memoise documentation built on Jan. 27, 2021, 1:08 a.m.