tipsy / profile-summary-for-github

Tool for visualizing GitHub profiles
https://profile-summary-for-github.com/
Apache License 2.0
19.83k stars 494 forks source link

Caching parameters are for MySQL not H2 #116

Closed brettwooldridge closed 2 years ago

brettwooldridge commented 2 years ago

I noticed that the caching parameters are copy-pasted from the HikariCP example initialization code, and as a result the caching parameters are relavent for MySQL, not H2.

https://github.com/tipsy/profile-summary-for-github/blob/123a10bed434b050466bb94cd515034d3d182b7b/src/main/kotlin/app/util/HikariCpDataSource.kt#L12-L14

Documentation for available H2 properties is here: https://www.h2database.com/javadoc/org/h2/engine/DbSettings.html#queryCacheSize

According to those docs, enabling statement caching would look like this:

private const val urlToDb = "jdbc:h2:mem:userinfo;QUERY_CACHE_SIZE=250"

(I am the author of HikariCP)

iProdigy commented 2 years ago

Good catch, thank you! Will correct this shortly

tipsy commented 2 years ago

Thanks @brettwooldridge! (also thank you for HikariCP, I use it a lot)