What is the real difference between nonstrict-read-write
and read-write
? I can read ehcache and Hibernate docs, but as far as I can see they only say that "read-write is better if you do updates". I find it unsatisfactory.
I may have an issue with long-lived cached collection configured like this:
<cache name="trx.domain.Parent.children" maxElementsInMemory="5000"
eternal="false" overflowToDisk="false" timeToIdleSeconds="1200"
timeToLiveSeconds="1800">
<cacheEventListenerFactory
class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
properties="replicateAsynchronously=true, replicatePuts=true, replicateUpdates=true, replicateUpdatesViaCopy=false, replicateRemovals=true" />
<set name="children" lazy="false" inverse="true">
<cache usage="nonstrict-read-write"/>
<key column="callout_id" />
<one-to-many class="Child" />
</set>
What exactly happens when the collection is updated, on the node where the update occurs and others? What is the difference between nonstrict-read-write
and read-write
here? Is it possible that a node will use its stale 10-minute version from cache?
Note the lengthy timeouts and asynchronous replication.