Skip to content

Commit

Permalink
feature/IVYPORTAL-18050-Create-cache-mechanism-for-dashboard-converte…
Browse files Browse the repository at this point in the history
…r-to-enhance-performance
  • Loading branch information
nhthinh-axonivy committed Dec 17, 2024
1 parent f8ca4eb commit 09202c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public PortalDashboardItemWrapper getDashboardCache() {
}

if (portalDashboardItemWrapper == null) {
synchronized (PortalDashboardItemWrapper.class) {
synchronized (this) {
portalDashboardItemWrapper = new PortalDashboardItemWrapper(DashboardUtils.collectDashboards());
cacheService.setSessionCache(IvyCacheIdentifier.PORTAL_DASHBOARDS, sessionUserId, portalDashboardItemWrapper);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static List<Dashboard> getPublicDashboards() {
}

if (portalPublicDashboardWrapper == null) {
synchronized (PortalPublicDashboardWrapper.class) {
synchronized (sessionUserId.intern()) {
List<Dashboard> dashboards = new ArrayList<>();
try {
String dashboardJson = Ivy.var().get(PortalVariable.DASHBOARD.key);
Expand Down Expand Up @@ -100,7 +100,7 @@ public static List<Dashboard> getPrivateDashboards() {
}

if (portalPrivateDashboardWrapper == null) {
synchronized (PortalPublicDashboardWrapper.class) {
synchronized (sessionUserId.intern()) {
List<Dashboard> dashboards = new ArrayList<>();
try {
String dashboardInUserProperty = readDashboardBySessionUser();
Expand Down

0 comments on commit 09202c5

Please sign in to comment.