-
Notifications
You must be signed in to change notification settings - Fork 509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change Cache to Embedded H2 #113
Conversation
Instead, I decided to use a simple TypeAdapter in order to deserialize number into java.util.Date.
Thank you so much, @iProdigy. |
Co-authored-by: Sidd <[email protected]>
This reverts commit 8306d92
Co-authored-by: Sidd <[email protected]>
follow-up change to 80154a0
Co-authored-by: Sidd <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Code looks good to me - will download H2 & test this out
@tipsy requesting your review :)
Thank you sooo much, @iProdigy for helping me learn to code in Kotlin. |
my pleasure! thanks for bearing with my nits |
Thanks @iProdigy and @Attacktive, I will have a look in the weekend ! |
src/main/kotlin/app/CacheService.kt
Outdated
val connection = HikariCpDataSource.connection | ||
|
||
createTableIfAbsent() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switch these two? The createTableIfAbsent()
method creates its own connection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, missed this one. It's also resolved by the below.
@Attacktive there seems to be a lot of changes here that are unrelated to the caching (particularly in |
Ah, the changes in
That's about it. 😁 |
Perfect! Nice work @Attacktive, thank you very much |
It resolves #110.
As a Kotlin noob, I am not sure if it's good enough but my two cents here.
I chose H2 only because I'm kind of familiar with it.
Switching to another like Nitrite or Derby shouldn't be a big deal.
You can enable the console by making a few changes.
I decided to have a single table with a
JSON
column which contains every bit of information in one out of laziness. 😒