Honour ErrorHandler if `Cache.put` fails
This commit makes sure that the `ErrorHandler` is invoked if the cache fails to put an element (be it in the main cache or the exception cache). See gh-1292 Issue: SPR-15188
This commit is contained in:
parent
c15d687bf0
commit
1fcb2608fb
|
|
@ -59,7 +59,7 @@ class CacheResultInterceptor extends AbstractKeyCacheInterceptor<CacheResultOper
|
|||
|
||||
try {
|
||||
Object invocationResult = invoker.invoke();
|
||||
cache.put(cacheKey, invocationResult);
|
||||
doPut(cache, cacheKey, invocationResult);
|
||||
return invocationResult;
|
||||
}
|
||||
catch (CacheOperationInvoker.ThrowableWrapper ex) {
|
||||
|
|
@ -88,7 +88,7 @@ class CacheResultInterceptor extends AbstractKeyCacheInterceptor<CacheResultOper
|
|||
return;
|
||||
}
|
||||
if (filter.match(ex.getClass())) {
|
||||
exceptionCache.put(cacheKey, ex);
|
||||
doPut(exceptionCache, cacheKey, ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue