In order to achieve a 1-second UX, we want to use caching. Additionally we've realized that the aggregate dataset will not change much over time, as GitCoin is going through a AlloV2 migration and we only use historical subgraphs from historical rounds.
Therefore we can use a simple user_prompt -> strategy_id cache, and invalidate it using a database migration in the future if the need presents itself.
Additional ideas:
- generate 100 example prompts, cache the 100 results, show a random 7 to each user that uses the app
- each of these 7 will be instantaneous results
In order to achieve a 1-second UX, we want to use caching. Additionally we've realized that the aggregate dataset will not change much over time, as GitCoin is going through a AlloV2 migration and we only use historical subgraphs from historical rounds.
Therefore we can use a simple
user_prompt -> strategy_idcache, and invalidate it using a database migration in the future if the need presents itself.Additional ideas: