[infinispan-dev] [ISPN-6] (Infinispan cache provider for Hibernate) Remaining TODOs, notes and questions

Manik Surtani manik at jboss.org
Tue Aug 4 09:35:23 EDT 2009


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
manik at jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20090804/dfd88e35/attachment-0002.html 


More information about the infinispan-dev mailing list