<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 4 Aug 2009, at 14:02, Galder Zamarreno wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><blockquote type="cite"><br class="Apple-interchange-newline">s/region.ispn4/infinispan<br></blockquote><br>Ok.<br><br>One thing here though. Chris's original solution works in such way that for each entity/collection, a new cache is retrieved from the cache manager using the region name, so for this example 3 caches would be created:<br><br>Cache1 for [org.hibernate.test.cache.infinispan.functional.VersionedItem]<br>Cache2 for [org.hibernate.test.cache.infinispan.functional.Item]<br>Cache2 for [org.hibernate.test.cache.infinispan.functional.Item.items]<br><br>Can we confirm this is the intented way? In<span class="Apple-converted-space">&nbsp;</span><a href="https://jira.jboss.org/jira/browse/ISPN-6">https://jira.jboss.org/jira/browse/ISPN-6</a><span class="Apple-converted-space">&nbsp;</span>the following is mentioned:<br><br>"Use a separate named cache per entity. This cache would hold entity instances as well as collections pertaining to that entity."<br><br>So, if that is followed and we bear in mind the above example, there should only be 2 cache instances created rather than the current 3.<br><br>What is clear is that there's no need for hibernate.cache.infinispan.cfg.entity or hibernate.cache.region.ispn4.cfg.collection. Simply stick the default cache configuration for entity/collections in the default section of configuration.<br><br>I don't we need hibernate.cache.infinispan.cfg.query and hibernate.cache.infinispan.cfg.timestamps either since we can simply name the caches with the corresponding region names (org.hibernate.cache.UpdateTimestampsCache]and org.hibernate.cache.StandardQueryCache) and that's it.<br></span></blockquote><br></div><div>I suppose that would depend on the need for different eviction characteristics for different entity types. &nbsp;So from that perspective (the ability to use) a different cache per entity is useful.</div><div><br></div><div>E.g.,</div><div><br></div><div>NoEvictionCache for [CountryList]</div><div>NoEvictionCache for [SomeOtherDropDown]</div><div>AggressivelyEvictedLRUCache for [Users]</div><div>AggressivelyEvictedLRUCache for [Orders]</div><div>LargeCapacityFIFOCache for [ProductsCatalog]</div><div><br></div><div>etc. may well prove useful. &nbsp;</div><div><br></div><div>Brian/Steve - care to chime in?</div><div><br></div>Cheers<br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>--</div><div>Manik Surtani</div><div><a href="mailto:manik@jboss.org">manik@jboss.org</a></div><div>Lead, Infinispan</div><div>Lead, JBoss Cache</div><div><a href="http://www.infinispan.org">http://www.infinispan.org</a></div><div><a href="http://www.jbosscache.org">http://www.jbosscache.org</a></div><div><br></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></body></html>