Sign in using Google or Yahoo! id.  

Liferay Multicast Cache Setup

 Comments Share:   Twitter   Reddit   HackerNews   Facebook 

Step 1

Extract the following two files from the portal-impl.jar (available in ROOT/WEB-INF/lib/portal-impl.jar):

  1. ehcache/hibernate-clustered.xml
  2. ehcache/liferay-multi-vm-clustered.xml

Step 2

Copy the extracted files into a custom folder, say myehcache inside the webapp classpath: ROOT/WEB-INF/classes/myehcache/.

Step 3

Update portal-ext.properties:

net.sf.ehcache.configurationResourceName=/myehcache/hibernate-clustered.xml

and:

ehcache.multi.vm.config.location=/myehcache/liferay-multi-vm-clustered.xml

Step 4

Define the new cache element in liferay-multi-vm-clustered.xml:

	<cache
		eternal="false"
		maxElementsInMemory="10000"
		name="cacheName"
		overflowToDisk="false"
		timeToLiveSeconds="600"
	>
		<cacheEventListenerFactory
			class="com.liferay.portal.cache.ehcache.LiferayCacheEventListenerFactory"
			properties="replicatePuts=true,replicateUpdatesViaCopy=true"
			propertySeparator=","
		/>
		<bootstrapCacheLoaderFactory class="com.liferay.portal.cache.ehcache.LiferayBootstrapCacheLoaderFactory" />
	</cache>
Posted on January 04, 2012 10:11 AM by Subhash Chandran
liferay
blog comments powered by Disqus