Ehcache configuration best practices

We learned about the basics of Ehcache and also different cache managers used in Liferay Portal. Now let's focus on the cache manager configuration to tune the caching mechanism in Liferay. Using the cache manager configuration, we can provide a cache control parameter for each and every cache bucket. Let's understand the important configuration parameters by looking at the defaultCache and cache elements of the Liferay multi-VM cache manager configuration file.

<defaultCache eternal="false" maxElementsInMemory="10000" overflowToDisk="false" timeToIdleSeconds="600" > <cacheEventListenerFactory class="com.liferay.portal.cache.ehcache.LiferayCacheEventListenerFactory" properties="replicatePuts=false,replicateUpdatesViaCopy=false" ...

Get Liferay Portal Performance Best Practices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.