On 4 Aug 2009, at 14:02, Galder Zamarreno wrote:


s/region.ispn4/infinispan

Ok.

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:

Cache1 for [org.hibernate.test.cache.infinispan.functional.VersionedItem]
Cache2 for [org.hibernate.test.cache.infinispan.functional.Item]
Cache2 for [org.hibernate.test.cache.infinispan.functional.Item.items]

Can we confirm this is the intented way? In https://jira.jboss.org/jira/browse/ISPN-6 the following is mentioned:

"Use a separate named cache per entity. This cache would hold entity instances as well as collections pertaining to that entity."

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.

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.

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.

I suppose that would depend on the need for different eviction characteristics for different entity types.  So from that perspective (the ability to use) a different cache per entity is useful.

E.g.,

NoEvictionCache for [CountryList]
NoEvictionCache for [SomeOtherDropDown]
AggressivelyEvictedLRUCache for [Users]
AggressivelyEvictedLRUCache for [Orders]
LargeCapacityFIFOCache for [ProductsCatalog]

etc. may well prove useful.  

Brian/Steve - care to chime in?

Cheers
--
Manik Surtani
Lead, Infinispan
Lead, JBoss Cache