You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe what change or improvement would you like
Because we're reading this data unofficially, it might be kind to cache the extracted lookup key in the class. Right now the code fetches the key repeatedly (sometimes multiple times per operation), which probably causes extra load.
When this package is used on a server, it's probably as a long-lived class. Since it doesn't change often, you could store the key on the class instance until you get a 404 (which could either be real, or a signal that the url has been updated).
You can provide a PR with your change so we can check it out and discuss it!
At the time I thought that caching was not a good idea because you have no idea when the key is gonna change and so retrying seemed a bit complex to me (is it failing because the key expired or because something else changed?)
If you don't think this is a problem you can provide an implementation
Describe what change or improvement would you like
Because we're reading this data unofficially, it might be kind to cache the extracted lookup key in the class. Right now the code fetches the key repeatedly (sometimes multiple times per operation), which probably causes extra load.
When this package is used on a server, it's probably as a long-lived class. Since it doesn't change often, you could store the key on the class instance until you get a 404 (which could either be real, or a signal that the url has been updated).
I did a similar approach here: xavdid/howlongtobeat@5375d74#diff-1af9a3390b92891b019f2dbae92c77ca7d05282003849d5642715613e809ab54R89, if that's useful!
The text was updated successfully, but these errors were encountered: