org.apache.http.impl.client.cache

## Class CachingHttpClientBuilder

- java.lang.Object
- - org.apache.http.impl.client.HttpClientBuilder
  - - org.apache.http.impl.client.cache.CachingHttpClientBuilder

-     public class CachingHttpClientBuilder
      extends HttpClientBuilder

  Builder for `CloseableHttpClient` instances capable of client-side caching.
  Since:
    4.3

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `CachingHttpClientBuilder()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static CachingHttpClientBuilder` | `create()`
    `protected ClientExecChain` | `decorateMainExec(ClientExecChain mainExec)` For internal use.
    `CachingHttpClientBuilder` | `setCacheConfig(CacheConfig cacheConfig)`
    `CachingHttpClientBuilder` | `setCacheDir(File cacheDir)`
    `CachingHttpClientBuilder` | `setDeleteCache(boolean deleteCache)`
    `CachingHttpClientBuilder` | `setHttpCacheInvalidator(HttpCacheInvalidator cacheInvalidator)`
    `CachingHttpClientBuilder` | `setHttpCacheStorage(HttpCacheStorage storage)`
    `CachingHttpClientBuilder` | `setResourceFactory(ResourceFactory resourceFactory)`
    `CachingHttpClientBuilder` | `setSchedulingStrategy(SchedulingStrategy schedulingStrategy)`

    - ### Methods inherited from class org.apache.http.impl.client.HttpClientBuilder

      `addCloseable, addInterceptorFirst, addInterceptorFirst, addInterceptorLast, addInterceptorLast, build, createMainExec, decorateProtocolExec, disableAuthCaching, disableAutomaticRetries, disableConnectionState, disableContentCompression, disableCookieManagement, disableDefaultUserAgent, disableRedirectHandling, evictExpiredConnections, evictIdleConnections, evictIdleConnections, setBackoffManager, setConnectionBackoffStrategy, setConnectionManager, setConnectionManagerShared, setConnectionReuseStrategy, setConnectionTimeToLive, setContentDecoderRegistry, setDefaultAuthSchemeRegistry, setDefaultConnectionConfig, setDefaultCookieSpecRegistry, setDefaultCookieStore, setDefaultCredentialsProvider, setDefaultHeaders, setDefaultRequestConfig, setDefaultSocketConfig, setDnsResolver, setHostnameVerifier, setHttpProcessor, setKeepAliveStrategy, setMaxConnPerRoute, setMaxConnTotal, setProxy, setProxyAuthenticationStrategy, setPublicSuffixMatcher, setRedirectStrategy, setRequestExecutor, setRetryHandler, setRoutePlanner, setSchemePortResolver, setServiceUnavailableRetryStrategy, setSslcontext, setSSLContext, setSSLHostnameVerifier, setSSLSocketFactory, setTargetAuthenticationStrategy, setUserAgent, setUserTokenHandler, useSystemProperties`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CachingHttpClientBuilder

          protected CachingHttpClientBuilder()

  - ### Method Detail

    - #### create

          public static CachingHttpClientBuilder create()

    - #### setResourceFactory

          public final CachingHttpClientBuilder setResourceFactory(ResourceFactory resourceFactory)

    - #### setHttpCacheStorage

          public final CachingHttpClientBuilder setHttpCacheStorage(HttpCacheStorage storage)

    - #### setCacheDir

          public final CachingHttpClientBuilder setCacheDir(File cacheDir)

    - #### setCacheConfig

          public final CachingHttpClientBuilder setCacheConfig(CacheConfig cacheConfig)

    - #### setSchedulingStrategy

          public final CachingHttpClientBuilder setSchedulingStrategy(SchedulingStrategy schedulingStrategy)

    - #### setHttpCacheInvalidator

          public final CachingHttpClientBuilder setHttpCacheInvalidator(HttpCacheInvalidator cacheInvalidator)

    - #### setDeleteCache

          public CachingHttpClientBuilder setDeleteCache(boolean deleteCache)

    - #### decorateMainExec

          protected ClientExecChain decorateMainExec(ClientExecChain mainExec)

      Description copied from class: `HttpClientBuilder`
      For internal use.
      Overrides:
        `decorateMainExec` in class `HttpClientBuilder`

Copyright © 1999–2022 The Apache Software Foundation. All rights reserved.