1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cache_filesystem.R
\name{cache_filesystem}
\alias{cache_filesystem}
\title{Filesystem Cache}
\usage{
cache_filesystem(path, algo = "xxhash64", compress = FALSE)
}
\arguments{
\item{path}{Directory in which to store cached items.}
\item{algo}{The hashing algorithm used for the cache, see
\code{\link[digest]{digest}} for available algorithms.}
\item{compress}{Argument passed to \code{saveRDS}. One of FALSE, "gzip",
"bzip2" or "xz". Default: FALSE.}
}
\description{
Use a cache on the local filesystem that will persist between R sessions.
}
\examples{
\dontrun{
# 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)
}
}
|