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

## Class DefaultCacheInvalidator

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

- All Implemented Interfaces:
    HttpCacheInvalidator

      @Contract(threading=STATELESS)
      @Internal
      public class DefaultCacheInvalidator
      extends Object
      implements HttpCacheInvalidator

  Given a particular HTTP request / response pair, flush any cache entries that this exchange would invalidate.
  Since:
    4.1

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static DefaultCacheInvalidator` | `INSTANCE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultCacheInvalidator()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `flushCacheEntriesInvalidatedByExchange(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.function.Resolver<URI,String> cacheKeyResolver, HttpCacheStorage storage)` Flush `HttpCacheEntry`s invalidated by the given message exchange.
    `void` | `flushCacheEntriesInvalidatedByRequest(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.function.Resolver<URI,String> cacheKeyResolver, HttpCacheStorage storage)` Flush `HttpCacheEntry`s invalidated by the given request.

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

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

- - ### Field Detail

    - #### INSTANCE

          public static final DefaultCacheInvalidator INSTANCE

  - ### Constructor Detail

    - #### DefaultCacheInvalidator

          public DefaultCacheInvalidator()

  - ### Method Detail

    - #### flushCacheEntriesInvalidatedByRequest

          public void flushCacheEntriesInvalidatedByRequest(org.apache.hc.core5.http.HttpHost host,
                                                   org.apache.hc.core5.http.HttpRequest request,
                                                   org.apache.hc.core5.function.Resolver<URI,String> cacheKeyResolver,
                                                   HttpCacheStorage storage)

      Description copied from interface: `HttpCacheInvalidator`
      Flush `HttpCacheEntry`s invalidated by the given request.
      Specified by:
        `flushCacheEntriesInvalidatedByRequest` in interface `HttpCacheInvalidator`
      Parameters:
        `host` - backend host
        `request` - request message
        `cacheKeyResolver` - cache key resolver used by cache storage
        `storage` - internal cache storage

    - #### flushCacheEntriesInvalidatedByExchange

          public void flushCacheEntriesInvalidatedByExchange(org.apache.hc.core5.http.HttpHost host,
                                                    org.apache.hc.core5.http.HttpRequest request,
                                                    org.apache.hc.core5.http.HttpResponse response,
                                                    org.apache.hc.core5.function.Resolver<URI,String> cacheKeyResolver,
                                                    HttpCacheStorage storage)

      Description copied from interface: `HttpCacheInvalidator`
      Flush `HttpCacheEntry`s invalidated by the given message exchange.
      Specified by:
        `flushCacheEntriesInvalidatedByExchange` in interface `HttpCacheInvalidator`
      Parameters:
        `host` - backend host
        `request` - request message
        `response` - response message
        `cacheKeyResolver` - cache key resolver used by cache storage
        `storage` - internal cache storage

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