sckott / webmiddens

cache http requests
https://sckott.github.io/webmiddens
Other
10 stars 1 forks source link

things that could be better #6

Closed sckott closed 4 years ago

sckott commented 4 years ago
# some fxn that does an http request
some_fxn <- function(x) {
  some_http_request(x)
}

# simply wrap it in a webmiddens fxn, with settings with a separte fxn perhaps
library(webmiddens)
web_settings(dir = "foo/bar", expire = 3)
cache(some_fxn(...))
# and can override session level settings
cache(some_fxn(...), expire = 5)