diff --git a/DESCRIPTION b/DESCRIPTION index c92ed89..f58acf2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: ROMOPAPI Title: ROMOPAPI -Version: 2.1.0 +Version: 2.1.1 Authors@R: person("Javier", "Gracia-Tabuenca", , "javier.graciatabuenca@tuni.fi", role = c("aut", "cre"), comment = c(ORCID = "YOUR-ORCID-ID")) diff --git a/Dockerfile b/Dockerfile index e6b2e4e..5bb60c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ RUN apt-get update && apt-get install -y openjdk-8-jdk liblzma-dev libbz2-dev li # Install renv and restore packages ARG ROMOPAPI_BRANCH=main -ARG BUILD_CACHE_BUSTER=2 +ARG BUILD_CACHE_BUSTER=3 # Install renv and restore packages RUN --mount=type=secret,id=build_github_pat \ diff --git a/NEWS.md b/NEWS.md index 285f144..5c940c6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,6 @@ +# ROMOPAPI 2.1.1 +- Added caching concepts with code counts at startup + # ROMOPAPI 2.1.0 - Added getAPIInfo endpoint to API - Updated db with large tree diff --git a/R/runApiServer.R b/R/runApiServer.R index 5946b16..74c78bf 100644 --- a/R/runApiServer.R +++ b/R/runApiServer.R @@ -65,6 +65,11 @@ runApiServer <- function( createCodeCountsTables(CDMdbHandler, codeCountsTable = "code_counts") } + # Call getConceptsWithCodeCounts, to populate the cache + ParallelLogger::logInfo("Populating cache with concepts with code counts") + getConceptsWithCodeCounts_memoise(CDMdbHandler) + + # Create plumber router pathToPlumberFile <- system.file("plumber", "plumber.R", package = "ROMOPAPI")