How to cache multi-user Access_token

Source: Internet
Author: User
Because it is a third-party public platform, and then useful to jssdk things, need to use Access_token and jsapi_ticket, but the problem is, for example, now a public number called JSSDK, it will save a access_token and Jsapi _ticket, put in access_token.php and jsapi_ticket.php inside, and if now B public number to call JSSDK, will appear invalid signature this error, Because B reads the Access_token and Jsapi_ticke that a just cached. Is there any way to solve this problem? is a and B calls mutually exclusive?


Reply to discussion (solution)

No one's mentioning anything?

Deposit Memcache,redis, local files, database can ah. Take the time to determine the expiration time, expired on the re-fetch, and then save, no expiration on the use of this.

Deposit Memcache,redis, local files, database can ah. Take the time to determine the expiration time, expired on the re-fetch, and then save, no expiration on the use of this.



Memcache,redis What are these 2? Which method is more convenient to use? I used the database.

With a unique identification mark.
Of course, the program must be revised.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.