Skip to content

Commit

Permalink
fix: cache doesn't work on first load (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
daytime-em authored Sep 26, 2024
1 parent 6833ace commit 4542ecc
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ internal class CacheDatastore(
fun open() {
synchronized(dbGuard) {
if (dbHelper == null) {
clearTempFiles()
ensureDirs()

val newHelper = DbHelper(context.applicationContext, indexDbDir())
// acquire an extra reference until closed. prevents DB underneath from closing/reopening
Expand Down

0 comments on commit 4542ecc

Please sign in to comment.