← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3460: Impl caching of expression associations. Speeds up validation process.

 

------------------------------------------------------------
revno: 3460
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2011-04-24 13:26:20 +0200
message:
  Impl caching of expression associations. Speeds up validation process.
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElement.hbm.xml
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/expression/hibernate/Expression.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/dataelement/hibernate/DataElement.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElement.hbm.xml	2011-04-12 13:25:06 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElement.hbm.xml	2011-04-24 11:26:20 +0000
@@ -59,6 +59,7 @@
     </set>
 
     <set name="dataSets" table="datasetmembers" inverse="true">
+      <cache usage="read-write" />
       <key column="dataelementid" />
       <many-to-many class="org.hisp.dhis.dataset.DataSet" column="datasetid" />
     </set>

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/expression/hibernate/Expression.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/expression/hibernate/Expression.hbm.xml	2011-04-23 18:52:44 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/expression/hibernate/Expression.hbm.xml	2011-04-24 11:26:20 +0000
@@ -17,6 +17,7 @@
     <property name="expression" type="text" />
 
     <set name="dataElementsInExpression" table="expressiondataelement">
+      <cache usage="read-write" />      
       <key column="expressionid" />
       <many-to-many class="org.hisp.dhis.dataelement.DataElement" column="dataelementid" foreign-key="fk_expression_dataelementid" />
     </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:04:14 +0000
+++ dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/ehcache.xml	2011-04-24 11:26:20 +0000
@@ -143,11 +143,17 @@
   <cache name="org.hisp.dhis.dataset.DataSet.sections"
     maxElementsInMemory="400"/>
   
+  <cache name="org.hisp.dhis.dataelement.DataElement.dataSets"
+    maxElementsInMemory="400"/>
+  
   <cache name="org.hisp.dhis.dataset.Section.dataElements"
     maxElementsInMemory="4000"/>
   
   <cache name="org.hisp.dhis.dataset.Section.greyedFields"
     maxElementsInMemory="1000"/>
+    
+  <cache name="org.hisp.dhis.expression.Expression.dataElementsInExpression"
+    maxElementsInMemory="1000"/>
   
   <!-- Hibernate Query Cache -->