This is an automated email from the ASF dual-hosted git repository.
arnold pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
The following commit(s) were added to refs/heads/develop by this push:
new 3b337c96e FINERACT-1724: Making sure that the cache is empty upon
starting a transaction for default cache configurations
3b337c96e is described below
commit 3b337c96eecedfe77344e9ce1c2dc12b992f6b07
Author: Arnold Galovics <[email protected]>
AuthorDate: Thu Mar 16 16:27:05 2023 +0100
FINERACT-1724: Making sure that the cache is empty upon starting a
transaction for default cache configurations
---
.../core/config/cache/TransactionBoundCacheManager.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/cache/TransactionBoundCacheManager.java
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/cache/TransactionBoundCacheManager.java
index 5a70b4e1a..713903bd8 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/cache/TransactionBoundCacheManager.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/cache/TransactionBoundCacheManager.java
@@ -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);