A SERVICE OF

logo

Storefront
BEA AquaLogic Commerce Services Deployment Guide 43
be updated, you may choose to configure JBoss Cache so that products are never evicted. To
prevent eviction, modify ep-treecache.xml so that the timeToLiveSeconds and maxAgeSeconds
attributes have a value of 0 as shown below.
<!-- Cache wide default -->
<region name="/_default_">
<!-- This is the maximum number of nodes allowed in this
region.
Any integer less than or equal to 0 will throw an
exception
when the policy provider is being configured for use. -->
<attribute name="maxNodes">50000</attribute>
<!-- Time to idle (in seconds) before the node is swept away.
0 denotes no limit. -->
<attribute name="timeToLiveSeconds">0</attribute>
<!-- Time an object should exist in TreeCache (in seconds)
regardless of idle time before the
node is swept away. 0 denotes no limit. -->
<attribute name="maxAgeSeconds">0</attribute>
</region>
When using this strategy, you will need to enable a job in quartz.xml (Storefront) that will
periodically retrieve modified products from the database and update their cache entries. To
enable this job, ensure that the updateProductCacheTrigger bean is declared in the
schedulerFactory bean as shown below.
<bean id="schedulerFactory"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<!-- The presence of this trigger enables the cache
refresh job -->
<ref bean="updateProductCacheTrigger" />
</list>
</property>
</bean>
You can configure the start delay and the interval that products are refreshed in the quartz.xml
XML block shown below.