Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update troubleshooting.md #29

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

seth-shi
Copy link
Contributor

No description provided.

@seth-shi seth-shi requested a review from kesonan as a code owner June 20, 2022 07:51
return &customMembersModel{
defaultMembersModel: &defaultMembersModel{
// 这里设置命中缓存和未命中缓存的过期时间
CachedConn: sqlc.NewConn(conn, c, cache.WithExpiry(time.Minute*2), cache.WithNotFoundExpiry(time.Minute)),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

time.Minute2应该替换为 time.Minute24,因为上文举例说的是1天

@@ -22,6 +22,25 @@
在 `sqlc.NewNodeConn` 的时候可以通过可选参数 `cache.WithExpiry` 传递,如缓存时间控制为1天,代码如下:
```go
sqlc.NewNodeConn(conn,redis,cache.WithExpiry(24*time.Hour))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有了下文的更新,这个最好删掉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已更改

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants