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" propertySeparator="," /> <bootstrapCacheLoaderFactory class="com.liferay.portal.cache.ehcache.LiferayBootstrapCacheLoaderFactory" /> </defaultCache> <cacheeternal...