Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

我注意到每次调用一下wx-tools里面的方法就会update一下里面的accessToken,但是微信是有调用限制的,怎么解决呢? #19

Open
cathylogs opened this issue Feb 22, 2020 · 1 comment

Comments

@cathylogs
Copy link

我注意到每次调用一下wx-tools里面的方法就会update一下里面的accessToken,但是微信是有调用限制的,怎么解决呢?
我的想法是通过redis来缓存accessToken,redis可以设置该值的过期时间,如果redis里面的被销毁了,那就获取新的accessToken,然后存储到redis中并使用

@antgan
Copy link
Owner

antgan commented Feb 22, 2020

可以的,我估计你是本地调试用光次数;因为我默认是存储在内存中,过期才会重新获得的。
我的做法是:继承重写刷新token的方法,然后输出token,写死在本地,这样调试就永远用同一个了

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

No branches or pull requests

2 participants