Hey I think in your case, theses pages are perfect to be cached, so don't bother yourself with over-engineering the fetching part.
Even the list will change not often so you can mess with your sql server.
You can do one sql request for each product (N+1), it's not an issue because to result will be cached.
This will help you to ship code fast and the cache will make it fast too
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey
I think in your case, theses pages are perfect to be cached, so don't bother yourself with over-engineering the fetching part.
Even the list will change not often so you can mess with your sql server.
You can do one sql request for each product (N+1), it's not an issue because to result will be cached.
This will help you to ship code fast and the cache will make it fast too