diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AsyncCachingExec.java b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AsyncCachingExec.java index 9848f5594..a6ad156c0 100644 --- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AsyncCachingExec.java +++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AsyncCachingExec.java @@ -877,7 +877,7 @@ class AsyncCachingExec extends CachingExecBase implements AsyncExecChainHandler public void completed(final CacheHit updated) { try { final SimpleHttpResponse cacheResponse = generateCachedResponse(request, updated.entry, responseDate); - context.setCacheEntry(hit.entry); + context.setCacheEntry(updated.entry); triggerResponse(cacheResponse, scope, asyncExecCallback); } catch (final ResourceIOException ex) { asyncExecCallback.failed(ex);