Open cyrlop opened 3 years ago
As I mentioned in #17 , I think we should only cache assets, not queries.
If we cache queries (e.g. table of champion names and IDs), it means we risk cross-referencing new queries (e.g. list of recent games) with old potentially out of date queries (e.g. list of champions when the app was deployed). If a new champion was added, it may not be present in the cache, and would cause problem if it's present in the list of recent games.
If we take the example of listing recent games and champions played:
Which is basically two queries in this case.
Bad example:
Basically, it's just about designing our queries well, to minimise the number of queries that are sent each time users navigate to a new page, but not necessarily caching queries between pages.
Ok that makes sense for:
Now should we close the issue for now or do you think we might might still need to store something?
We need to decide where and how to store/cache queried data to avoid spamming Riot's API like you mentioned @kevinrue. I don't think there is a built-in solution in FastAPI. We can: