Skip to content

Commit 67235a8

Browse files
committed
优化缓存key规则
1 parent 999adeb commit 67235a8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

auth.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package weapp
22

33
import (
4+
"fmt"
5+
46
"github.com/medivhzhan/weapp/v3/request"
57
)
68

@@ -60,7 +62,7 @@ type TokenResponse struct {
6062

6163
// access_token 缓存 KEY
6264
func (cli *Client) tokenCacheKey() string {
63-
return "weapp.access.token"
65+
return fmt.Sprintf("weapp.%s.access.token", cli.appid)
6466
}
6567

6668
func (cli *Client) GetAccessToken() (*TokenResponse, error) {

0 commit comments

Comments
 (0)