dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #42937
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21859: Clear hibernate cache for struts user group updates
------------------------------------------------------------
revno: 21859
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2016-02-03 10:43:11 +0700
message:
Clear hibernate cache for struts user group updates
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/usergroup/UpdateUserGroupAction.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/usergroup/UpdateUserGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/usergroup/UpdateUserGroupAction.java 2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/usergroup/UpdateUserGroupAction.java 2016-02-03 03:43:11 +0000
@@ -31,10 +31,12 @@
import com.opensymphony.xwork2.Action;
import org.apache.commons.lang3.StringUtils;
import org.hisp.dhis.attribute.AttributeService;
+import org.hisp.dhis.cache.HibernateCacheManager;
import org.hisp.dhis.user.User;
import org.hisp.dhis.user.UserGroup;
import org.hisp.dhis.user.UserGroupService;
import org.hisp.dhis.user.UserService;
+import org.springframework.beans.factory.annotation.Autowired;
import java.util.HashSet;
import java.util.List;
@@ -64,6 +66,9 @@
this.attributeService = attributeService;
}
+ @Autowired
+ private HibernateCacheManager hibernateCacheManager;
+
// -------------------------------------------------------------------------
// Parameters
// -------------------------------------------------------------------------
@@ -141,6 +146,8 @@
userGroupService.updateUserGroup( userGroup );
+ hibernateCacheManager.clearCache();
+
return SUCCESS;
}
}