We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70d2683 commit 439e576Copy full SHA for 439e576
app/src/main/java/guide/graphql/toc/Apollo.kt
@@ -1,7 +1,13 @@
1
package guide.graphql.toc
2
3
import com.apollographql.apollo.ApolloClient
4
+import com.apollographql.apollo.cache.normalized.lru.EvictionPolicy
5
+import com.apollographql.apollo.cache.normalized.lru.LruNormalizedCacheFactory
6
+
7
+val cacheFactory =
8
+ LruNormalizedCacheFactory(EvictionPolicy.builder().maxSizeBytes(10 * 1024 * 1024).build())
9
10
val apolloClient: ApolloClient = ApolloClient.builder()
11
.serverUrl("https://api.graphql.guide/graphql")
12
+ .normalizedCache(cacheFactory)
13
.build()
0 commit comments