← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3462: Impl caching of reporttable and chart associations

 

------------------------------------------------------------
revno: 3462
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2011-04-24 14:17:55 +0200
message:
  Impl caching of reporttable and chart associations
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/DataSet.hbm.xml
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/dashboard/hibernate/DashboardContent.hbm.xml
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.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/dataset/hibernate/DataSet.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/DataSet.hbm.xml	2011-04-24 11:04:14 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/DataSet.hbm.xml	2011-04-24 12:17:55 +0000
@@ -38,6 +38,7 @@
     </set>
 
     <set name="sources" table="datasetsource">
+      <cache usage="read-write" />
       <key column="datasetid" />
       <many-to-many column="sourceid" class="org.hisp.dhis.organisationunit.OrganisationUnit" foreign-key="fk_dataset_organisationunit"/>
     </set>

=== 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-24 11:37:12 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml	2011-04-24 12:17:55 +0000
@@ -55,6 +55,7 @@
     <property name="lastUpdated" />
 
     <set name="dataSets" table="datasetsource" inverse="true">
+      <cache usage="read-write" />
       <key column="sourceid" />
       <many-to-many class="org.hisp.dhis.dataset.DataSet" column="datasetid" />
     </set>

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml	2011-04-23 19:09:19 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml	2011-04-24 12:17:55 +0000
@@ -210,6 +210,7 @@
     class="org.hisp.dhis.dashboard.hibernate.HibernateDashboardContentStore">
     <property name="clazz" value="org.hisp.dhis.dashboard.DashboardContent"/>
     <property name="sessionFactory" ref="sessionFactory"/>
+	<property name="cacheable" value="true"/>
   </bean>
   
   <bean id="org.hisp.dhis.dashboard.DashboardService"

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml	2011-04-23 19:09:19 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml	2011-04-24 12:17:55 +0000
@@ -33,18 +33,21 @@
     <property name="targetLineValue" />
 
     <list name="indicators" table="chart_indicators">
+      <cache usage="read-write" />
       <key column="chartid" />
       <list-index column="sort_order" base="0" />
       <many-to-many column="indicatorid" class="org.hisp.dhis.indicator.Indicator" />
     </list>
 
     <list name="periods" table="chart_periods">
+      <cache usage="read-write" />
       <key column="chartid" />
       <list-index column="sort_order" base="0" />
       <many-to-many column="periodid" class="org.hisp.dhis.period.Period" />
     </list>
 
     <list name="organisationUnits" table="chart_organisationunits">
+      <cache usage="read-write" />
       <key column="chartid" />
       <list-index column="sort_order" base="0" />
       <many-to-many column="organisationunitid" class="org.hisp.dhis.organisationunit.OrganisationUnit" />

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/dashboard/hibernate/DashboardContent.hbm.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/dashboard/hibernate/DashboardContent.hbm.xml	2011-04-12 13:30:10 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/dashboard/hibernate/DashboardContent.hbm.xml	2011-04-24 12:17:55 +0000
@@ -6,6 +6,8 @@
 <hibernate-mapping>
   <class name="org.hisp.dhis.dashboard.DashboardContent" table="dashboardcontent">
 
+    <cache usage="read-write" />
+
     <id name="id" column="dashboardcontentid">
       <generator class="foreign">
         <param name="property">user</param>

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml	2011-04-23 19:09:19 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml	2011-04-24 12:17:55 +0000
@@ -19,18 +19,21 @@
     <property name="regression" />
 
     <list name="dataElements" table="reporttable_dataelements">
+      <cache usage="read-write" />
       <key column="reporttableid" />
       <list-index column="sort_order" base="0" />
       <many-to-many column="dataelementid" class="org.hisp.dhis.dataelement.DataElement" />
     </list>
 
     <list name="indicators" table="reporttable_indicators">
+      <cache usage="read-write" />
       <key column="reporttableid" />
       <list-index column="sort_order" base="0" />
       <many-to-many column="indicatorid" class="org.hisp.dhis.indicator.Indicator" />
     </list>
 
     <list name="dataSets" table="reporttable_datasets">
+      <cache usage="read-write" />
       <key column="reporttableid" />
       <list-index column="sort_order" base="0" />
       <many-to-many column="datasetid" class="org.hisp.dhis.dataset.DataSet" />
@@ -40,12 +43,14 @@
       foreign-key="fk_reporttable_categorycombo" />
 
     <list name="periods" table="reporttable_periods">
+      <cache usage="read-write" />
       <key column="reporttableid" />
       <list-index column="sort_order" base="0" />
       <many-to-many column="periodid" class="org.hisp.dhis.period.Period" />
     </list>
 
     <list name="units" table="reporttable_organisationunits">
+      <cache usage="read-write" />
       <key column="reporttableid" />
       <list-index column="sort_order" base="0" />
       <many-to-many column="organisationunitid" class="org.hisp.dhis.organisationunit.OrganisationUnit" />

=== 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:37:12 +0000
+++ dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/ehcache.xml	2011-04-24 12:17:55 +0000
@@ -4,7 +4,7 @@
   <diskStore path="java.io.tmpdir"/>
 
   <defaultCache
-    maxElementsInMemory="400000"
+    maxElementsInMemory="500000"
     eternal="false"
     timeToIdleSeconds="360"
     timeToLiveSeconds="720"
@@ -120,6 +120,9 @@
   <cache name="org.hisp.dhis.document.Document"
     maxElementsInMemory="100"/>
   
+  <cache name="org.hisp.dhis.dashboard.DashboardContent"
+    maxElementsInMemory="1000"/>
+  
   <!-- Hibernate Associations -->
   
   <cache name="org.hisp.dhis.dataelement.DataElementCategoryCombo.categories"
@@ -140,6 +143,9 @@
   <cache name="org.hisp.dhis.dataset.DataSet.dataElements"
     maxElementsInMemory="4000"/>
   
+  <cache name="org.hisp.dhis.dataset.DataSet.sources"
+    maxElementsInMemory="20000"/>
+  
   <cache name="org.hisp.dhis.dataset.DataSet.sections"
     maxElementsInMemory="400"/>
   
@@ -158,6 +164,33 @@
   <cache name="org.hisp.dhis.organisationunit.OrganisationUnit.children"
     maxElementsInMemory="20000"/>
   
+  <cache name="org.hisp.dhis.organisationunit.OrganisationUnit.dataSets"
+    maxElementsInMemory="400"/>
+  
+  <cache name="org.hisp.dhis.reporttable.ReportTable.dataElements"
+    maxElementsInMemory="4000"/>
+  
+  <cache name="org.hisp.dhis.reporttable.ReportTable.indicators"
+    maxElementsInMemory="1000"/>
+  
+  <cache name="org.hisp.dhis.reporttable.ReportTable.dataSets"
+    maxElementsInMemory="100"/>
+    
+  <cache name="org.hisp.dhis.reporttable.ReportTable.periods"
+    maxElementsInMemory="200"/>
+    
+  <cache name="org.hisp.dhis.reporttable.ReportTable.units"
+    maxElementsInMemory="2000"/>
+    
+  <cache name="org.hisp.dhis.chart.Chart.indicators"
+    maxElementsInMemory="1000"/>
+    
+  <cache name="org.hisp.dhis.chart.Chart.periods"
+    maxElementsInMemory="200"/>
+    
+  <cache name="org.hisp.dhis.chart.Chart.organisationUnits"
+    maxElementsInMemory="2000"/>
+    
   <!-- Hibernate Query Cache -->
   
   <cache name="org.hibernate.cache.StandardQueryCache"