Skip to content

Commit

Permalink
feat: use json cache by default
Browse files Browse the repository at this point in the history
  • Loading branch information
j178 committed Jan 2, 2024
1 parent e6b6048 commit 9073a0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions leetcode/cache_json.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build json
//go:build !sqlite

package leetcode

Expand Down Expand Up @@ -117,7 +117,7 @@ func (c *jsonCache) GetById(id string) *QuestionData {
defer func(start time.Time) {
log.Debug("get by id", "elapsed", time.Since(start))
}(time.Now())

c.load()
return c.frontIds[id]
}
Expand Down
2 changes: 1 addition & 1 deletion leetcode/cache_sqlite.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build !json
//go:build sqlite

package leetcode

Expand Down

0 comments on commit 9073a0f

Please sign in to comment.