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)
HenrikBengtsson/R.cache documentation built on Sept. 30, 2023, 5:01 a.m.