Browse Source

update set token from cache

ls 2 years ago
parent
commit
1119bd1778
1 changed files with 5 additions and 0 deletions
  1. 5 0
      client.go

+ 5 - 0
client.go

@@ -22,6 +22,11 @@ func NewClient(appID, appSecret, token, encodingAESKey string) *Client {
 	return c
 }
 
+// UseCacheToken token from cache
+func (wc *Client) UseCacheToken() {
+	wc.UseCacheToken = true
+}
+
 // getToken get token
 func (wc *Client) getToken() (token string, err error) {
 	key := keyToken(wc.AppID)