httpCache

@JvmName(name = "configureApolloClientBuilder")
fun ApolloClient.Builder.httpCache(directory: File, maxSize: Long): ApolloClient.Builder

Deprecated

Use `DefaultHttpRequestComposer(enablePostCaching = true)` instead. See https://go.apollo.dev/ak-http-cache

Configures a persistent LRU HTTP cache for the ApolloClient.

Parameters

directory

: the directory where the cache will be persisted

maxSize

: the maxSize in bytes that the cache acn occupy

See also ApolloClient.Builder.httpEngine and ApolloClient.Builder.networkTransport


Deprecated

Use `DefaultHttpRequestComposer(enablePostCaching = true)` instead. See https://go.apollo.dev/ak-http-cache