Using the same configuration, with only defaultCache, I get inconsistent data (case A). But if I add an additional cache entry will not get those errors of inconsistency (case B).
Do you know why?
I do not want to set the 130 caches that set aumaticamente defaultCache
Thanks in advance
P. S. I guess all the time that what is not specified, will EHCache as a template using defaultCache settings.
Case A:
<defaultCache
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="0"
overflowToDisk="false"
>
<cacheEventListenerFactory
class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
/>
<bootstrapCacheLoaderFactory class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory" />
</defaultCache>
`
Case B:
<defaultCache
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="0"
overflowToDisk="false"
>
<cacheEventListenerFactory
class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
/>
<bootstrapCacheLoaderFactory class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory" />
</defaultCache>
<cache
name="com.liferay.portal.model.impl.LayoutImpl"
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="0"
overflowToDisk="false"
>
<cacheEventListenerFactory
class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
/>
<bootstrapCacheLoaderFactory class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory" />
</cache>
Since you haven't said how to you use cache it's hard to guess what you are really doing and what errors of inconsistency do you mean.
Maybe you are not caching query results with cached entities, which makes entities to be read from cache and queries from database? There are many possible cases.