Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

cache_filesystem

Filesystem Cache


Description

Use a cache on the local filesystem that will persist between R sessions.

Usage

cache_filesystem(path, algo = "xxhash64", compress = FALSE)

Arguments

path

Directory in which to store cached items.

algo

The hashing algorithm used for the cache, see digest for available algorithms.

compress

Argument passed to saveRDS. One of FALSE, "gzip", "bzip2" or "xz". Default: FALSE.

Examples

## Not run: 
# Use with Dropbox

db <- cache_filesystem("~/Dropbox/.rcache")

mem_runif <- memoise(runif, cache = db)

# Use with Google Drive

gd <- cache_filesystem("~/Google Drive/.rcache")

mem_runif <- memoise(runif, cache = gd)


## End(Not run)

memoise

Memoisation of Functions

v2.0.0
MIT + file LICENSE
Authors
Hadley Wickham [aut], Jim Hester [aut, cre], Winston Chang [aut], Kirill Müller [aut], Daniel Cook [aut], Mark Edmondson [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.