Skip to content

Commit 205fa56

Browse files
CRoberto1926gitgoodjhe
authored andcommitted
Closes #2634: Add TaskanaEngine.clearSessionCache to clear cache of underlying SQL session
1 parent 4ca0ae8 commit 205fa56

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/taskana-core/src/main/java/pro/taskana/common/api/TaskanaEngine.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ default void runAsAdmin(Runnable runnable) {
226226
*/
227227
CurrentUserContext getCurrentUserContext();
228228

229+
/** Clears the cache of the underlying local SQL session. */
230+
void clearSqlSessionCache();
231+
229232
/**
230233
* Connection management mode. Controls the connection handling of taskana
231234
*

lib/taskana-core/src/main/java/pro/taskana/common/internal/TaskanaEngineImpl.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,11 @@ public CurrentUserContext getCurrentUserContext() {
371371
return currentUserContext;
372372
}
373373

374+
@Override
375+
public void clearSqlSessionCache() {
376+
sessionManager.clearCache();
377+
}
378+
374379
/**
375380
* This method creates the sqlSessionManager of myBatis. It integrates all the SQL mappers and
376381
* sets the databaseId attribute.

0 commit comments

Comments
 (0)