Package com.apollographql.apollo3.cache.http

Types

Link copied to clipboard
interface ApolloHttpCache
Link copied to clipboard
class CachingHttpInterceptor(    directory: File,     maxSize: Long,     fileSystem: FileSystem = FileSystem.SYSTEM) : HttpInterceptor
Link copied to clipboard
class DiskLruHttpCache(    fileSystem: FileSystem,     directory: File,     maxSize: Long) : ApolloHttpCache
Link copied to clipboard
enum HttpFetchPolicy : Enum<HttpFetchPolicy>

Functions

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

Configures a persistent LRU HTTP cache for the ApolloClient.

Link copied to clipboard
fun <T> MutableExecutionOptions<T>.httpDoNotStore(httpDoNotStore: Boolean): T

Configures httpDoNotStore. Entries will never be stored if set to true.

Link copied to clipboard
fun <T> MutableExecutionOptions<T>.httpExpireAfterRead(httpExpireAfterRead: Boolean): T

Configures httpExpireAfterRead. Entries will be removed from the cache after read if set to true.

Link copied to clipboard
fun <T> MutableExecutionOptions<T>.httpExpireTimeout(httpExpireTimeout: Long): T

Configures httpExpireTimeout. Entries will be removed from the cache after this timeout.

Link copied to clipboard
fun <T> MutableExecutionOptions<T>.httpFetchPolicy(httpFetchPolicy: HttpFetchPolicy): T

Configures the HttpFetchPolicy

Properties

Link copied to clipboard
val ApolloClient.httpCache: ApolloHttpCache
Link copied to clipboard
val <D : Operation.Data> ApolloResponse<D>.isFromHttpCache: Boolean