Skip to content

Update troubleshooting.md#29

Open
seth-shi wants to merge 2 commits intozeromicro:mainfrom
seth-shi:patch-3
Open

Update troubleshooting.md#29
seth-shi wants to merge 2 commits intozeromicro:mainfrom
seth-shi:patch-3

Conversation

@seth-shi
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

已更改

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants