提交 3476d10e 编写于 作者: D David Brimley 提交者: Stephane Nicoll

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
上级 7796c4db
......@@ -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);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册