Skip to content

Commit

Permalink
update epiparamter_db to use cached DB
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwlambert committed Nov 22, 2024
1 parent 6b4d8a3 commit 450afce
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion R/epiparameter_db.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,13 @@ epiparameter_db <- function(disease = "all",
)
}

multi_epiparameter <- .read_epiparameter_db()
cache_db <- cache_env$cache$get("multi_epiparameter")
if (inherits(cache_db, "multi_epiparameter")) {
multi_epiparameter <- cache_env$cache$get("multi_epiparameter")
} else {
multi_epiparameter <- .read_epiparameter_db()
}

attrib <- attributes(multi_epiparameter)

multi_epiparameter <- .filter_epiparameter_db(
Expand Down

0 comments on commit 450afce

Please sign in to comment.