Open maksood1920 opened 10 months ago
I don't think there's a native built-in way to do this but you could certainly build your own from the ApolloInterceptor
API.
You can copy/paste most of the HTTP cache implementation and replace the DiskLruHttpCache
with a Guava cache, or make this configurable when setting up the HTTP cache.
That'd actually be an awesome contribution if you feel like it.
@maksood1920 did you find a solution to this this problem eventually?
Question
Hi All,
I have setup normalised cache for my graphql. I observed as the response size increases caching seems ineffective. E.g - For the response size of 257, the latency from cache goes to 15 ms(p90). However If I cache the response with simple guava cache then the latency falls back to 0.05ms.
I overridden the fromFieldArguments method of CacheKeyResolver as well but didn't help much either.
Data -
I want to have CacheKeyResolver on individual offerId but offerId is present in the offerFilter and that is not allowing me to get cache key for individual record. I tried HTTP cache on top of normalised cache but that is disk based storage and that is not acceptable,
I want to disable normalisation and for my apollo client but something similar to in memory guava cache. Is there any way I can achieve this ?