How can I refetch only certain queries?

I am making about 10 queries to analyze product groups. A product group has multiple products.
The product group to be analyzed is specified by giving the productGroupId to the variables.

Now when I add or remove products to or from the product group, I want to re-fetch only the analysis queries for the changed product group.
I would like to use the cache without refetching the analysis query for the unchanged product group, as each analysis takes a significant amount of time.
Do you have any good ideas? Any advice would be appreciated.