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

## Class CachingHttpClients

- java.lang.Object
- - org.apache.hc.client5.http.impl.cache.CachingHttpClients

-     public final class CachingHttpClients
      extends Object

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

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static CloseableHttpClient` | `createFileBound(File cacheDir)` Creates `CloseableHttpClient` instance that uses a file system bound response cache.
    `static CloseableHttpClient` | `createMemoryBound()` Creates `CloseableHttpClient` instance that uses a memory bound response cache.
    `static CachingHttpClientBuilder` | `custom()` Creates builder object for construction of custom `CloseableHttpClient` instances.

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

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

- - ### Method Detail

    - #### custom

          public static CachingHttpClientBuilder custom()

      Creates builder object for construction of custom `CloseableHttpClient` instances.

    - #### createMemoryBound

          public static CloseableHttpClient createMemoryBound()

      Creates `CloseableHttpClient` instance that uses a memory bound response cache.

    - #### createFileBound

          public static CloseableHttpClient createFileBound(File cacheDir)

      Creates `CloseableHttpClient` instance that uses a file system bound response cache.
      Parameters:
        `cacheDir` - location of response cache.

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