Stylianos Gakis05/17/2022, 12:47 PM
bod05/17/2022, 1:03 PM
If I haven’t configured a httpCache in my ApolloClient, does that mean that any calls to httpFetchPolicy on any of my `ApolloCall`s have no effect?Correct ✅
How does it work if you’ve got both of them configured at the same time?Well, the HTTP one is last in the call chain. In theory a cache miss at the normalized level could still result in a cache hit at the HTTP level, but I don't expect this scenario to happen often. This page explains the differences between the 2. In summary, the HTTP one is simpler to setup/use but less powerful than the Normalized one.
Stylianos Gakis05/17/2022, 1:27 PM
Correct ✅Damn it must’ve been like that for years 😂 Thanks a lot for helping out! But alright I think it makes sense actually. We got the normalized cache configured already, so adding the Http one is probably like a “why not” situation right? Then I wonder, are there any use cases where you’d want to configure a different fetch policy for one and a different for the other? If not, maybe I could introduce a function locally that just configures the same policy for both caches
Grégory Lureau05/17/2022, 1:34 PM
so adding the Http one is probably like a “why not”Is it not risky to have normalized + http cache? I've lost enough time with cache issues to consider them very carefully and only pick the more relevant one when possible. Is there advantages to use both of them?
bod05/17/2022, 1:47 PM
Stylianos Gakis05/17/2022, 2:03 PM
I don’t think either of these functions are referenced inside the documentation. Did a text search in the folder “apollo-kotlin/docs/source”. Should they be mentioned somewhere?
bod05/17/2022, 2:06 PM
they’d have to do both right?✅ correct
Should they be mentioned somewhere?Aren't, but probably should yes 😅
Grégory Lureau05/18/2022, 6:59 AM
bod05/18/2022, 7:47 AM
Grégory Lureau05/18/2022, 7:55 AM
bod05/18/2022, 8:02 AM