Greetings. I have a question actually about the Ap...
# apollo-kotlin
f
Greetings. I have a question actually about the Apollo Normalized Cache. Will a
NetworkOnly
fetch policy still update the cache with the response?
👌 1
w
Yes, these policies only control where the data comes from, not whether it's saved to the cache
Here's an example in tests — first query is
NetworkOnly
, second is
CacheOnly
and is able to grab data from the cache https://github.com/apollographql/apollo-kotlin/blob/3441362ba45072821cb82fc13895608fb7cbcac5/tests/integration-tests/src/commonTest/kotlin/test/OtherCacheTest.kt#L50-L65
f
awesome, thank you!
a
We use multiple Apollo clients in our app that utilize different combination of caches/ no caches. If you need cases where none goes into the cache ( if you didn’t want to store sensitive information for example)