cache_download: Cache Download

View source: R/cache_download.R

cache_downloadR Documentation

Cache Download

Description

By default, all downloads are cached both on the disk and in your computer memory. This means that the second time you download a file during the same session it will be reloaded from your ram. If you stop a session and restart it, the file will be loaded from your disk. If you want to reload the data from its original source, use the bust_cache function.

Usage

cache_download(
  url,
  ...,
  use_memory = TRUE,
  use_disk = TRUE,
  bust_cache = FALSE
)

Arguments

url

The URL to download from.

...

arguments to forward to the vroom::vroom function.

use_memory

Whether to use memory caching.

use_disk

Whether to use disk caching.

bust_cache

Whether to bust (refresh) the cache.

Details

Additionally, options can be used to determine the default caching behavior of tidyiddr.

Examples

cache_download("https://s3.amazonaws.com/quartzdata/datasets/caserates-by-age.csv")

options("tidyiddr_use_cache" = TRUE)
cache_download("https://s3.amazonaws.com/quartzdata/datasets/caserates-by-age.csv")

QuartzSoftwareLLC/tidyiddr documentation built on Jan. 27, 2023, 3:46 p.m.