File: cache_gcs.Rd

package info (click to toggle)
r-cran-memoise 2.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 208 kB
  • sloc: sh: 10; makefile: 5
file content (40 lines) | stat: -rw-r--r-- 995 bytes parent folder | download | duplicates (2)
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
39
40
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cache_gcs.R
\name{cache_gcs}
\alias{cache_gcs}
\title{Google Cloud Storage Cache
Google Cloud Storage backed cache, for remote caching.}
\usage{
cache_gcs(
  cache_name = googleCloudStorageR::gcs_get_global_bucket(),
  algo = "sha512",
  compress = FALSE
)
}
\arguments{
\item{cache_name}{Bucket name for storing cache files.}

\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{
Google Cloud Storage Cache
Google Cloud Storage backed cache, for remote caching.
}
\examples{

\dontrun{
library(googleCloudStorageR)
# Set GCS credentials.
Sys.setenv("GCS_AUTH_FILE"="<google-service-json>",
           "GCS_DEFAULT_BUCKET"="unique-bucket-name")

gcs <- cache_gcs("unique-bucket-name")
mem_runif <- memoise(runif, cache = gcs)
}


}