Hello! This is a bit of a long stretch, but is the...
# apollo-kotlin
e
Hello! This is a bit of a long stretch, but is there an easy way to tell which cache, in-memory or sql, the result of
apolloStore.readFragment()
came from? 😄 Context is that I want to add tracing to fragment reads, as I suspect that we have some huge fragments that are slow to be read on low-end devices, but probably the hit cache also makes a big difference.
b
This is not exactly what you’re asking but what you could do is wrap your caches in your implementation of
NormalizedCache
that add logs in there. That would be “record oriented” info though, not fragment/query oriented. I don’t think there is currently a way to distinguish where a Fragment comes from specifically, as some fields can come from the in-memory one, and others from the sqlite one.
1
e
Oh, that's great info, I didn't realise that it's not all or nothing, but rather different fields can come from different caches 🤯 Thanks, I'll think about this to see how I can use this information!
👍 2