Closes #2634: Add TaskanaEngine.clearSessionCache to clear cache of underlying SQL session

This commit is contained in:
CRoberto1926 2024-07-29 16:55:10 +02:00 committed by Jörg Heffner
parent 4ca0ae869f
commit 205fa56baa
2 changed files with 8 additions and 0 deletions

View File

@ -226,6 +226,9 @@ public interface TaskanaEngine {
*/ */
CurrentUserContext getCurrentUserContext(); CurrentUserContext getCurrentUserContext();
/** Clears the cache of the underlying local SQL session. */
void clearSqlSessionCache();
/** /**
* Connection management mode. Controls the connection handling of taskana * Connection management mode. Controls the connection handling of taskana
* *

View File

@ -371,6 +371,11 @@ public class TaskanaEngineImpl implements TaskanaEngine {
return currentUserContext; return currentUserContext;
} }
@Override
public void clearSqlSessionCache() {
sessionManager.clearCache();
}
/** /**
* This method creates the sqlSessionManager of myBatis. It integrates all the SQL mappers and * This method creates the sqlSessionManager of myBatis. It integrates all the SQL mappers and
* sets the databaseId attribute. * sets the databaseId attribute.