Skip to content

Commit 75a6ec8

Browse files
committed
feat: make set_cache more verbose
1 parent 6a9c29a commit 75a6ec8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

R/cache.R

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ set_cache <- function(cache_dir = NULL,
154154
}
155155
}
156156

157-
158157
if (!cache_usable) {
159158
print(glue::glue(
160159
"The directory at {cache_dir} is not accessible; check permissions and/or use a different ",
@@ -168,6 +167,13 @@ set_cache <- function(cache_dir = NULL,
168167
logfile = file.path(cache_dir, logfile)
169168
)
170169
}
170+
171+
cli::cli_inform(c(
172+
"!" = "epidatr cache is being used (set env var EPIDATR_USE_CACHE=FALSE if not intended).",
173+
"i" = "The cache directory is {cache_dir}.",
174+
"i" = "The cache will be cleared after {days} days and will be pruned if it exceeds {max_size} MB.",
175+
"i" = "The log of cache transactions is stored at {file.path(cache_dir, logfile)}."
176+
))
171177
}
172178

173179
#' Manually reset the cache, deleting all currently saved data and starting afresh

0 commit comments

Comments
 (0)