We should cache relations/stats between a user and a level to avoid additional DB calls when serializing levels for API responses, since we include these relations in level responses. These relations should be cached in a dedicated DB table, which would probably include at least the following:
- Whether the user has hearted the level
- Whether the user has queued the level
- The user's rating on the level
- How often the user has played the level in any game
- How often the user has completed the level in any game
- How many uploaded photos the user has taken in the level
We should cache relations/stats between a user and a level to avoid additional DB calls when serializing levels for API responses, since we include these relations in level responses. These relations should be cached in a dedicated DB table, which would probably include at least the following: