deleteCaches {simpleCache}R Documentation

Deletes caches

Description

Given a cache name, this function will attempt to delete the cache of that name on disk.

Usage

deleteCaches(cacheNames, cacheDir = getCacheDir(), force = FALSE)

Arguments

cacheNames

Name(s) of the cache to delete

cacheDir

Directory where caches are kept

force

Force deletion without user prompt

Examples

# choose location to store caches
cacheDir = tempdir()
cacheDir
setCacheDir(cacheDir)

# build some caches
simpleCache("normSample", { rnorm(5e3, 0,1) }, recreate=TRUE, timer=TRUE)
simpleCache("normSample", { rnorm(5e3, 0,1) })
simpleCache("normSample", { rnorm(5e3, 0,1) }, reload=TRUE)

# storing a cache after-the-fact
normSample2 = rnorm(10, 0, 1)
storeCache("normSample2")

# what's available?
listCaches()

# load a cache
simpleCache("normSample")

# load multiples caches
loadCaches(c("normSample", "normSample2"), reload=TRUE)

[Package simpleCache version 0.4.2 Index]