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
parent 3646bc08b1
commit 2cff92ef13
2 changed files with 8 additions and 0 deletions

View File

@ -226,6 +226,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

@ -371,6 +371,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.