public HttpCacheEntry create(final Instant requestInstant,
                                 final Instant responseInstant,
                                 final HttpHost host,
                                 final HttpRequest request,
                                 final HttpResponse response,
                                 final Resource resource) {
        Args.notNull(requestInstant, "Request instant");
        Args.notNull(responseInstant, "Response instant");
        Args.notNull(host, "Host");
        Args.notNull(request, "Request");
        Args.notNull(response, "Origin response");
        final String s = CacheKeyGenerator.getRequestUri(host, request);
        final URI uri = CacheKeyGenerator.normalize(s);
        final HeaderGroup requestHeaders = filterHopByHopHeaders(request);
        // Strip AUTHORIZATION from request headers
        requestHeaders.removeHeaders(HttpHeaders.AUTHORIZATION);
        final HeaderGroup responseHeaders = filterHopByHopHeaders(response);
        ensureDate(responseHeaders, responseInstant);
        return new HttpCacheEntry(
                requestInstant,
                responseInstant,
                request.getMethod(),
                uri.toASCIIString(),
                requestHeaders,
                response.getCode(),
                responseHeaders,
                resource,
                null);
    }
Create a new {@link HttpCacheEntry} with the given {@link Resource}.

@param requestInstant   Date/time when the request was made (Used for age calculations)
@param responseInstant  Date/time that the response came back (Used for age calculations)
@param host             Target host
@param request          Original client request (a deep copy of this object is made)
@param response         Origin response (a deep copy of this object is made)
@param resource         Resource representing origin response body
httpclient5-cache/src/main/java/org/apache/hc/client5/http/cache/HttpCacheEntryFactory.java