Skip to content

Cache codes from API, only fetch new ones after a certain amount of time #13

@trs

Description

@trs

To help with server load from the API provided by shift.orcicorn.com, we should cache the available codes and only request new ones if the cache is old.

This occurs at 00:02, 06:02, 12:02 and 18:02 server-time ( New York, USA )


On redeem, we want to store the result. Time should probably be based on the meta.generated field. On the next redeem request, check if the current time in New York, USA is > 1 hour from the meta.generated. If it is, send the request. If not, use the cached codes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions