Bug fix: async cache protocol handler incorrectly updates the actual cache entry in the cache execution context upon cache entry re-validation

This commit is contained in:
Oleg Kalnichevski 2024-10-14 17:58:35 +02:00
parent e7b3a5316c
commit e6a410439f
1 changed files with 1 additions and 1 deletions

View File

@ -877,7 +877,7 @@ class AsyncCachingExec extends CachingExecBase implements AsyncExecChainHandler
public void completed(final CacheHit updated) { public void completed(final CacheHit updated) {
try { try {
final SimpleHttpResponse cacheResponse = generateCachedResponse(request, updated.entry, responseDate); final SimpleHttpResponse cacheResponse = generateCachedResponse(request, updated.entry, responseDate);
context.setCacheEntry(hit.entry); context.setCacheEntry(updated.entry);
triggerResponse(cacheResponse, scope, asyncExecCallback); triggerResponse(cacheResponse, scope, asyncExecCallback);
} catch (final ResourceIOException ex) { } catch (final ResourceIOException ex) {
asyncExecCallback.failed(ex); asyncExecCallback.failed(ex);