File: clearCache.R

package info (click to toggle)
r-cran-r.cache 0.17.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 392 kB
  • sloc: sh: 14; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 449 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)