Wechat jssdk's question about jsapi_ticket

now I have two servers An and B.
the code on both servers is exactly the same. Jsapi_ticket writes cache
in the case that there is no cache on both servers, server A fetches jsapi_ticket and caches locally, and server B also gets jsapi_ticket and caches locally. The time is less than 7200 seconds
is the jsapi_ticket of server An invalidated now?

May.22,2021

Yes, when you re-enter the acquisition server A, the server B fails again. If the two servers do not do Synchronize, they will overwrite it back and forth. So you can use A server as an interface for B to get.


you can store it in the redis cache so that it is consistent and will not cause the last invalidation due to re-acquisition

Menu