Skip to content

Commit

Permalink
Removed unused method argument
Browse files Browse the repository at this point in the history
  • Loading branch information
ok2c committed Aug 21, 2023
1 parent 06700d0 commit 6bdd389
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ private void handleCacheHit(
}
LOG.debug("Cache hit");
try {
final SimpleHttpResponse cacheResponse = generateCachedResponse(responseCacheControl, hit.entry, request, context);
final SimpleHttpResponse cacheResponse = generateCachedResponse(hit.entry, request, context);
triggerResponse(cacheResponse, scope, asyncExecCallback);
} catch (final ResourceIOException ex) {
recordCacheFailure(target, request);
Expand Down Expand Up @@ -634,7 +634,7 @@ private void handleCacheHit(
&& (validityPolicy.mayReturnStaleWhileRevalidating(responseCacheControl, hit.entry, now) || staleIfErrorEnabled)) {
LOG.debug("Serving stale with asynchronous revalidation");
try {
final SimpleHttpResponse cacheResponse = generateCachedResponse(responseCacheControl, hit.entry, request, context);
final SimpleHttpResponse cacheResponse = generateCachedResponse(hit.entry, request, context);
final String exchangeId = ExecSupport.getNextExchangeId();
context.setExchangeId(exchangeId);
final AsyncExecChain.Scope fork = new AsyncExecChain.Scope(
Expand All @@ -658,7 +658,7 @@ private void handleCacheHit(
LOG.debug("Serving stale response due to IOException and stale-if-error enabled");
}
try {
final SimpleHttpResponse cacheResponse = generateCachedResponse(responseCacheControl, hit.entry, request, context);
final SimpleHttpResponse cacheResponse = generateCachedResponse(hit.entry, request, context);
triggerResponse(cacheResponse, scope, asyncExecCallback);
} catch (final ResourceIOException ex2) {
if (LOG.isDebugEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ private ClassicHttpResponse handleCacheHit(
}
LOG.debug("Cache hit");
try {
return convert(generateCachedResponse(responseCacheControl, hit.entry, request, context), scope);
return convert(generateCachedResponse(hit.entry, request, context), scope);
} catch (final ResourceIOException ex) {
recordCacheFailure(target, request);
if (!mayCallBackend(requestCacheControl)) {
Expand Down Expand Up @@ -284,7 +284,7 @@ private ClassicHttpResponse handleCacheHit(
scope.originalRequest,
scope.execRuntime.fork(null),
HttpClientContext.create());
final SimpleHttpResponse response = generateCachedResponse(responseCacheControl, hit.entry, request, context);
final SimpleHttpResponse response = generateCachedResponse(hit.entry, request, context);
cacheRevalidator.revalidateCacheEntry(
hit.getEntryKey(),
() -> revalidateCacheEntry(requestCacheControl, responseCacheControl, hit, target, request, fork, chain));
Expand All @@ -296,7 +296,7 @@ private ClassicHttpResponse handleCacheHit(
if (LOG.isDebugEnabled()) {
LOG.debug("Serving stale response due to IOException and stale-if-error enabled");
}
return convert(generateCachedResponse(responseCacheControl, hit.entry, request, context), scope);
return convert(generateCachedResponse(hit.entry, request, context), scope);
}
return convert(handleRevalidationFailure(requestCacheControl, responseCacheControl, hit.entry, request, context, now), scope);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ void recordCacheUpdate(final HttpContext context) {
}

SimpleHttpResponse generateCachedResponse(
final ResponseCacheControl responseCacheControl,
final HttpCacheEntry entry,
final HttpRequest request,
final HttpContext context) throws ResourceIOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public final CachingHttpClientBuilder setCacheConfig(final CacheConfig cacheConf
* @deprecated Do not use.
*/
@Deprecated
public final CachingHttpClientBuilder setHttpCacheInvalidator(final org.apache.hc.client5.http.cache.HttpAsyncCacheInvalidator cacheInvalidator) {
public final CachingHttpClientBuilder setHttpCacheInvalidator(final org.apache.hc.client5.http.cache.HttpCacheInvalidator cacheInvalidator) {
return this;
}

Expand Down

0 comments on commit 6bdd389

Please sign in to comment.