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 46ab7853fc
commit 4f8e8ba1ae
2 changed files with 8 additions and 0 deletions

View File

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

View File

@ -385,6 +385,11 @@ public class TaskanaEngineImpl implements TaskanaEngine {
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.