Skip to content

Commit 64d794e

Browse files
committed
Restore old caching policy on DAOs under Spring configuration
1 parent 8416d81 commit 64d794e

2 files changed

Lines changed: 77 additions & 7 deletions

File tree

client/tomcatconf/applicationContext.xml.in

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,82 @@
8989

9090
<bean id="eventBus" class = "org.apache.cloudstack.framework.eventbus.EventBusBase" />
9191

92-
<bean id="apiServlet" class = "com.cloud.api.ApiServlet" />
92+
<!--
93+
DAO with customized configuration
94+
-->
95+
<bean id="configurationDaoImpl" class="com.cloud.configuration.dao.ConfigurationDaoImpl">
96+
</bean>
97+
98+
<bean id="serviceOfferingDaoImpl" class="com.cloud.service.dao.ServiceOfferingDaoImpl">
99+
<property name="configParams">
100+
<map>
101+
<entry key="cache.size" value="50" />
102+
<entry key="cache.time.to.live" value="600" />
103+
</map>
104+
</property>
105+
</bean>
106+
107+
<bean id="diskOfferingDaoImpl" class="com.cloud.storage.dao.DiskOfferingDaoImpl">
108+
<property name="configParams">
109+
<map>
110+
<entry key="cache.size" value="50" />
111+
<entry key="cache.time.to.live" value="600" />
112+
</map>
113+
</property>
114+
</bean>
115+
116+
<bean id="dataCenterDaoImpl" class="com.cloud.dc.dao.DataCenterDaoImpl">
117+
<property name="configParams">
118+
<map>
119+
<entry key="cache.size" value="50" />
120+
<entry key="cache.time.to.live" value="600" />
121+
</map>
122+
</property>
123+
</bean>
93124

125+
<bean id="hostPodDaoImpl" class="com.cloud.dc.dao.HostPodDaoImpl">
126+
<property name="configParams">
127+
<map>
128+
<entry key="cache.size" value="50" />
129+
<entry key="cache.time.to.live" value="600" />
130+
</map>
131+
</property>
132+
</bean>
133+
134+
<bean id="vlanDaoImpl" class="com.cloud.dc.dao.VlanDaoImpl">
135+
<property name="configParams">
136+
<map>
137+
<entry key="cache.size" value="30" />
138+
<entry key="cache.time.to.live" value="3600" />
139+
</map>
140+
</property>
141+
</bean>
142+
143+
<bean id="userDaoImpl" class="com.cloud.user.dao.UserDaoImpl">
144+
<property name="configParams">
145+
<map>
146+
<entry key="cache.size" value="5000" />
147+
<entry key="cache.time.to.live" value="300" />
148+
</map>
149+
</property>
150+
</bean>
151+
152+
<bean id="VMTemplateDaoImpl" class="com.cloud.storage.dao.VMTemplateDaoImpl">
153+
<property name="configParams">
154+
<map>
155+
<entry key="cache.size" value="100" />
156+
<entry key="cache.time.to.live" value="600" />
157+
</map>
158+
</property>
159+
</bean>
160+
161+
<bean id="hypervisorCapabilitiesDaoImpl" class="com.cloud.hypervisor.dao.HypervisorCapabilitiesDaoImpl">
162+
<property name="configParams">
163+
<map>
164+
<entry key="cache.size" value="100" />
165+
<entry key="cache.time.to.live" value="600" />
166+
</map>
167+
</property>
168+
</bean>
169+
94170
</beans>

client/tomcatconf/componentContext.xml.in

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,4 @@
254254
<property name="name" value="OvmGuru"/>
255255
</bean>
256256

257-
<!--
258-
DAO with customized configuration
259-
-->
260-
<bean id="configurationDaoImpl" class="com.cloud.configuration.dao.ConfigurationDaoImpl">
261-
</bean>
262-
263257
</beans>

0 commit comments

Comments
 (0)