normalizedCache
fun ApolloClient.Builder.normalizedCache(normalizedCacheFactory: NormalizedCacheFactory, cacheKeyGenerator: CacheKeyGenerator = TypePolicyCacheKeyGenerator, metadataGenerator: MetadataGenerator = EmptyMetadataGenerator, cacheResolver: CacheResolver = FieldPolicyCacheResolver, recordMerger: RecordMerger = DefaultRecordMerger, fieldKeyGenerator: FieldKeyGenerator = DefaultFieldKeyGenerator, embeddedFieldsProvider: EmbeddedFieldsProvider = DefaultEmbeddedFieldsProvider, writeToCacheAsynchronously: Boolean = false): ApolloClient.Builder
Configures an ApolloClient with a normalized cache.
Parameters
normalizedCacheFactory
a factory that creates a com.apollographql.cache.normalized.api.NormalizedCache. It will only be called once. The reason this is a factory is to enforce creating the cache from a non-main thread. For native the thread where the cache is created will also be isolated so that the cache can be mutated.
cacheResolver
a CacheResolver to customize normalization
writeToCacheAsynchronously
set to true to write to the cache after the response has been emitted. This allows to display results faster