Cache codes from API, only fetch new ones after a certain amount of time #13
Labels
feature
New features added
good first issue
Good for newcomers
help wanted
Extra attention is needed
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.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 inNew York, USA
is > 1 hour from themeta.generated
. If it is, send the request. If not, use the cached codes.The text was updated successfully, but these errors were encountered: