Skip to content

Navigation Menu

Sign in
Sign up

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

Open
Labels
featureNew features added good first issueGood for newcomers help wantedExtra attention is needed

Description

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.

Activity

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

    featureNew features added good first issueGood for newcomers help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      AltStyle によって変換されたページ (->オリジナル) /