org.apache.hc.client5.http.impl.cache

## Class CachingHttpClientBuilder

- java.lang.Object
- - org.apache.hc.client5.http.impl.classic.HttpClientBuilder
  - - org.apache.hc.client5.http.impl.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

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static CachingHttpClientBuilder` | `create()`
    `protected void` | `customizeExecChain(org.apache.hc.core5.http.config.NamedElementChain<ExecChainHandler> execChainDefinition)` Request exec chain customization and extension.
    `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.hc.client5.http.impl.classic.HttpClientBuilder

      `addCloseable, addExecInterceptorAfter, addExecInterceptorBefore, addExecInterceptorFirst, addExecInterceptorLast, addRequestInterceptorFirst, addRequestInterceptorLast, addResponseInterceptorFirst, addResponseInterceptorLast, build, disableAuthCaching, disableAutomaticRetries, disableConnectionState, disableContentCompression, disableCookieManagement, disableDefaultUserAgent, disableRedirectHandling, evictExpiredConnections, evictIdleConnections, replaceExecInterceptor, setBackoffManager, setConnectionBackoffStrategy, setConnectionManager, setConnectionManagerShared, setConnectionReuseStrategy, setContentDecoderRegistry, setDefaultAuthSchemeRegistry, setDefaultCookieSpecRegistry, setDefaultCookieStore, setDefaultCredentialsProvider, setDefaultHeaders, setDefaultRequestConfig, setKeepAliveStrategy, setProxy, setProxyAuthenticationStrategy, setRedirectStrategy, setRequestExecutor, setRetryStrategy, setRoutePlanner, setSchemePortResolver, 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)

    - #### setSchedulingStrategy

          public final CachingHttpClientBuilder setSchedulingStrategy(SchedulingStrategy schedulingStrategy)

    - #### setCacheConfig

          public final CachingHttpClientBuilder setCacheConfig(CacheConfig cacheConfig)

    - #### setHttpCacheInvalidator

          public final CachingHttpClientBuilder setHttpCacheInvalidator(HttpCacheInvalidator cacheInvalidator)

    - #### setDeleteCache

          public final CachingHttpClientBuilder setDeleteCache(boolean deleteCache)

    - #### customizeExecChain

          protected void customizeExecChain(org.apache.hc.core5.http.config.NamedElementChain<ExecChainHandler> execChainDefinition)

      Description copied from class: `HttpClientBuilder`
      Request exec chain customization and extension.

      For internal use.

      Overrides:
        `customizeExecChain` in class `HttpClientBuilder`

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