x <- list(a = 1, b = 2:4)
base <- c(as.character(Sys.Date()), "A", "B")
cache_write(x, base)
cache_read(base, ask = FALSE)
cache_exists(base)
cache_clear()
# Use cache_pipe() for automatic use (saves and loads if exists)
cache_pipe({
x <- 1
x + 1
})
cache_pipe({
x <- 1
x + 1
})
Run the code above in your browser using DataLab