dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11800
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3461: Impl caching OrganisationUnit children association. Speeds up loading of orgunit tree.
------------------------------------------------------------
revno: 3461
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2011-04-24 13:37:12 +0200
message:
Impl caching OrganisationUnit children association. Speeds up loading of orgunit tree.
modified:
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml
dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/ehcache.xml
--
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-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml 2011-04-22 21:04:14 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml 2011-04-24 11:37:12 +0000
@@ -20,6 +20,7 @@
</property>
<set name="children" inverse="true" cascade="save-update,delete-orphan">
+ <cache usage="read-write" />
<key column="parentid" />
<one-to-many class="org.hisp.dhis.organisationunit.OrganisationUnit" />
</set>
=== modified file 'dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/ehcache.xml'
--- dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/ehcache.xml 2011-04-24 11:26:20 +0000
+++ dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/ehcache.xml 2011-04-24 11:37:12 +0000
@@ -154,6 +154,9 @@
<cache name="org.hisp.dhis.expression.Expression.dataElementsInExpression"
maxElementsInMemory="1000"/>
+
+ <cache name="org.hisp.dhis.organisationunit.OrganisationUnit.children"
+ maxElementsInMemory="20000"/>
<!-- Hibernate Query Cache -->