Caching behavior

Hello everyone, could you please help me with the following:
I have this query

query Samples(
    $condition: SampleCondition
    $filter: SampleFilter
    $geneFamilyIds: [Int!] = []
    $geneIds: [Int!] = []
  ) {
    sampleStats(condition: $condition, filter: $filter) {
      id
      cardGeneFamilies(geneFamilyIds: $geneFamilyIds) {
        key
        value
      }
      cardGenes(geneIds: $geneIds) {
        key
        value
      }
    }
  }

i make a request, with an array of geneIds filled with [1,2]. Receive a response and cache the data into MemoryCache. Then I make a request again with an array of geneIds [3,4], and of course I see a new request, because the variables changed.
After that, I make a request with geneIds as [1,2] again, and I expect cache to work, to get data from the cache. But instead I see a request to my API.
How can I fix it ? As you can see ‘SampleStats’ type, which is returned by sampleStats, actually has an id field, so I expect it to be cached.

Hi @Nikita_Bortnikov. Which client are you using - Web (TypeScript), iOS, or Kotlin?

hello, I use Web client.
I investigated around, and now I realize, that the problem somehow related to the fact that, I have parent field arguments, and children field arguments in the query. So whenever child arguments change, I refetch the entire field including parent, and then even when I try to fetch child with the previous old argument, the cache doesn’t give me the data. I somehow need to configure the Apollo in a way that, child field is refetched if parent OR child arguments changed. In all other cases I need to get data from the cache