Skip to content

Hi, I have some question about token cached. #50

Open

Description

@wangcaohong

Hi, I have a question about token cached. as we know, The access/refresh_token has an expiration date, do u use redis or other in token cached? such as if token has expired, program will listen to the expired information of Redis and then update the token with refresh_token.

Activity

  1. JimCurryWang commented on Aug 15, 2022

    @JimCurryWang
    Owner

    Hi @The-Wong ,

    In the initial design concept, we hope to keep python-shopee as light as possible, so we didn't include the Redis solution in the cache mechanism. However, I think we can just reinitialize the client instance to get the token update again.

    # Reinitialize
    client = pyshopee.Client( shopid, partnerid, API_key )

    I hope this is helpful.

  2. wangcaohong commented on Aug 15, 2022

    @wangcaohong
    Author

    Thank you for your reply, but if refresh_token has expired and not reacquired within 30 days , user just need to re-authorized shop, this is very bad in the user experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions