powered by
drop_cache
Forget past results. Resets the cache of a memoised function. Use drop_cache to reset the cache only for particular arguments.
forget(f)
memoised function
memoise, is.memoised, drop_cache
memoise
is.memoised
# NOT RUN { 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())) # }
Run the code above in your browser using DataLab