diff --git a/NEWS.md b/NEWS.md index 7c6821c9..33e2f287 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,6 @@ # httr2 (development version) +* `req_cache()` now defaults the `debug` argument to the `httr2_cache_debug` option to make it easier to debug caching buried in other people's code (#486). * `req_oauth_password()` now only asks for your password once (#498). * `req_url_query()` now allows you to opt out of escaping for multi-value parameters (#404). * `req_perform_parallel()` now works correctly with `req_cache()` (#447). diff --git a/R/req-cache.R b/R/req-cache.R index d63aa643..b42828c2 100644 --- a/R/req-cache.R +++ b/R/req-cache.R @@ -54,7 +54,7 @@ req_cache <- function(req, path, use_on_error = FALSE, - debug = FALSE, + debug = getOption("httr2_cache_debug", FALSE), max_age = Inf, max_n = Inf, max_size = 1024^3) { diff --git a/man/req_cache.Rd b/man/req_cache.Rd index 8c63549a..c15875ce 100644 --- a/man/req_cache.Rd +++ b/man/req_cache.Rd @@ -8,7 +8,7 @@ req_cache( req, path, use_on_error = FALSE, - debug = FALSE, + debug = getOption("httr2_cache_debug", FALSE), max_age = Inf, max_n = Inf, max_size = 1024^3