Right now, to get all_champions and all_seasons, these are additional requests out to opgg, but more importantly, these do not change regularly.
Caching this information makes much more sense.
System:
Build a new copy of the cache every week? (specific day?)
Track an initial start day, lets say 2023-08-30 and store in db
Each run, see if current date is initial+7 days
-> if it is, store current date as initial and loop ...
-> once thats been stored, do a request to any summoner_id's full (non-summary) endpoint to pull a fresh list of all_champions and all_seasons
Replace above logic with checking a champion id against the table, and if it doesnt exist, THEN do an update. This is the most ideal way to do this as it removes even the uneccessary daily/weekly/monthly requests and only does it when it needs to.
Once request has been performed, and we have the all_champs and all_seasons, build out champ and season tables
We then query the db to build out the champion and season objects
Right now, to get all_champions and all_seasons, these are additional requests out to opgg, but more importantly, these do not change regularly.
Caching this information makes much more sense.
System:
Build a new copy of the cache every week? (specific day?)Track an initial start day, lets say 2023-08-30 and store in dbEach run, see if current date is initial+7 days-> if it is, store current date as initial and loop ...-> once thats been stored, do a request to any summoner_id's full (non-summary) endpoint to pull a fresh list of all_champions and all_seasonsReplace above logic with checking a champion id against the table, and if it doesnt exist, THEN do an update. This is the most ideal way to do this as it removes even the uneccessary daily/weekly/monthly requests and only does it when it needs to.
Once request has been performed, and we have the all_champs and all_seasons, build out champ and season tables
We then query the db to build out the champion and season objects
Set related properties
[x] Insert logic for champions
[x] Insert logic for seasons
[x] Get logic for champions
[x] Get logic for seasons