tests/clearCache.R

library("R.cache")

## Use an empty temporary file cache
setCacheRootPath(path=file.path(tempdir()))

## Try to clear it
clearCache(recursive=TRUE, prompt=FALSE)
clearCache(recursive=TRUE, prompt=TRUE)

dirs <- c("tests", "clearCache")
saveCache(1, key=list("clearCache"), dirs=dirs)

clearCache(recursive=FALSE, prompt=TRUE)
clearCache(recursive=TRUE, prompt=TRUE)
clearCache(recursive=FALSE, prompt=FALSE)
clearCache(recursive=TRUE, prompt=FALSE)

Try the R.cache package in your browser

Any scripts or data that you put into this service are public.

R.cache documentation built on July 21, 2022, 5:11 p.m.