Class CachedHttpResponseGenerator


  • class CachedHttpResponseGenerator
    extends java.lang.Object
    Rebuilds an HttpResponse from a HttpCacheEntry
    • Constructor Detail

      • CachedHttpResponseGenerator

        CachedHttpResponseGenerator​(CacheValidityPolicy validityStrategy)
    • Method Detail

      • generateNotModifiedResponse

        SimpleHttpResponse generateNotModifiedResponse​(HttpCacheEntry entry)
        Generate a 304 - Not Modified response from the HttpCacheEntry. This should be used to respond to conditional requests, when the entry exists or has been re-validated.
      • generateContentLength

        private void generateContentLength​(org.apache.hc.core5.http.HttpResponse response,
                                           byte[] body)
      • responseShouldContainEntity

        private boolean responseShouldContainEntity​(org.apache.hc.core5.http.HttpRequest request,
                                                    HttpCacheEntry cacheEntry)