Print "cached" instead of timing info for cached requests
Change-Id: I64e87ffee251aae9bc09516b47054f856f58f66e
diff --git a/R/KorAPQuery.R b/R/KorAPQuery.R
index 7a59ae7..cf848f0 100644
--- a/R/KorAPQuery.R
+++ b/R/KorAPQuery.R
@@ -188,8 +188,10 @@
log.info(verbose, "Searching \"", query, "\" in \"", vc, "\"", sep =
"")
res = apiCall(kco, paste0(requestUrl, '&count=0'))
- log.info(verbose, " took ", res$meta$benchmark, "\n", sep =
- "")
+ if(!is.null(res$meta$cached))
+ log.info(verbose, " [cached]\n")
+ else
+ log.info(verbose, " took ", res$meta$benchmark, "\n", sep = "")
if (as.df)
data.frame(
query = query,