From 8608fca1b548341228aec4eccaff46e3675c09cc Mon Sep 17 00:00:00 2001 From: hadley Date: Fri, 18 Aug 2017 07:23:50 -0500 Subject: [PATCH] Only supress caching if credentials supplied Fixes #475 --- NEWS.md | 2 ++ R/oauth-token.r | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 09ae53f6..f115927e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # httr 1.3.0.9000 +* Re-enable on-disk caching (accidentally disabled in #457) (#475) + # httr 1.3.0 ## API changes diff --git a/R/oauth-token.r b/R/oauth-token.r index 2adf92c0..6cac121d 100644 --- a/R/oauth-token.r +++ b/R/oauth-token.r @@ -232,7 +232,7 @@ oauth2.0_token <- function(endpoint, app, scope = NULL, user_params = NULL, endpoint = endpoint, params = params, credentials = credentials, - cache_path = FALSE + cache_path = if (is.null(credentials)) cache else FALSE ) }