Writes a tibble to RDS (and optionally CSV) in dir. Default dir is resolved with here::here() so the path is anchored to the project root rather than the current working directory.

cache_podcast_data(
  x,
  dir = here::here("data_cache"),
  filename = NULL,
  csv = TRUE
)

Arguments

x

Object to cache.

dir

Directory to save data to. Default: here::here("data_cache").

filename

Optional filename sans extension; defaults to deparse(substitute(x)).

csv

If TRUE (default), also saves a CSV file with the same base name.

Value

Invisibly returns the path(s) written, or NULL for empty input.

Examples

if (FALSE) { # \dontrun{
atp <- atp_get_episodes(page_limit = 1)
cache_podcast_data(atp, csv = FALSE)
} # }