diff --git a/lib/taskana-core/src/main/java/pro/taskana/common/api/TaskanaEngine.java b/lib/taskana-core/src/main/java/pro/taskana/common/api/TaskanaEngine.java index 111c02efe6..62c19c1561 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/common/api/TaskanaEngine.java +++ b/lib/taskana-core/src/main/java/pro/taskana/common/api/TaskanaEngine.java @@ -246,6 +246,9 @@ default void runAsAdmin(Runnable runnable) { */ CurrentUserContext getCurrentUserContext(); + /** Clears the cache of the underlying local SQL session. */ + void clearSqlSessionCache(); + /** * Connection management mode. Controls the connection handling of taskana * diff --git a/lib/taskana-core/src/main/java/pro/taskana/common/internal/TaskanaEngineImpl.java b/lib/taskana-core/src/main/java/pro/taskana/common/internal/TaskanaEngineImpl.java index 7ebd4971ef..4dec297384 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/common/internal/TaskanaEngineImpl.java +++ b/lib/taskana-core/src/main/java/pro/taskana/common/internal/TaskanaEngineImpl.java @@ -385,6 +385,11 @@ public CurrentUserContext getCurrentUserContext() { return currentUserContext; } + @Override + public void clearSqlSessionCache() { + sessionManager.clearCache(); + } + /** * This method creates the sqlSessionManager of myBatis. It integrates all the SQL mappers and * sets the databaseId attribute.