FINERACT-1724: Making sure that the cache is empty upon starting a transaction for default cache configurations

This commit is contained in:
Arnold Galovics
2023-03-16 18:02:51 +01:00
committed by Arnold Gálovics
parent 41651a6cbb
commit 3b337c96ee
@@ -31,6 +31,15 @@ public class TransactionBoundCacheManager implements TransactionLifecycleCallbac
@Override
public void afterCompletion() {
resetCaches();
}
@Override
public void afterBegin() {
resetCaches();
}
private void resetCaches() {
Collection<String> cacheNames = delegate.getCacheNames();
cacheNames.forEach(c -> {
Cache cache = delegate.getCache(c);