R/request_cache_funcs.R

Defines functions .load_cache .save_cache .check_cache cache_name_format_request

# **************** cache_name_format ****************************************cache_name_format**
cache_name_format_request <- function(prop_name) {
  return(paste("api_req", prop_name, sep = "_"))
}
# **************** .check_cache ****************************************.check_cache**
.check_cache <- function(prop_name) {
  check_cache(cache_name_format_request(prop_name))
}
# **************** .save_cache ****************************************.save_cache**
.save_cache <- function(prop_name, data) {
  save_cache(cache_name_format_request(prop_name), data)
}
# **************** .load_cache ****************************************.load_cache**
.load_cache <- function(prop_name) {
  load_cache(cache_name_format_request(prop_name))
}

Try the Rapi package in your browser

Any scripts or data that you put into this service are public.

Rapi documentation built on May 29, 2024, 2:34 a.m.