> On 24 Feb 2015, at 13:23, Sanne Grinovero <[email protected]> wrote: > > Interesting, so it seems it's possible to configure a specific cache > for a specific entity?
Yes. It's been possible since the very first Infinispan 2LC implementation. The advanced configuration section in [1] explains how to do so. [1] http://infinispan.org/docs/7.1.x/user_guide/user_guide.html#_advanced_configuration_2 > I thought this was a pending limitation of the Infinispan Cache, and > I'm afraid most other users will think it too as none of this is > mentioned in the Hibernate documentation. > > > > On 24 February 2015 at 12:13, Dan Berindei <[email protected]> wrote: >> I believe the user guide has the answer to the original question: >> >> http://infinispan.org/docs/7.0.x/user_guide/user_guide.html#_advanced_configuration_2 >> >>> On top of that, this finer grained cache definition enables users to define >>> cache settings on a per entity/collection basis. For example: >>> >>> <!-- If using JPA, add to your persistence.xml --> >>> <property name="hibernate.cache.infinispan.com.acme.Person.cfg" >>> value="person-entity"/> >>> <property name="hibernate.cache.infinispan.com.acme.Person.addresses.cfg" >>> value="addresses-collection"/> >> >> >> I don't think the mapping can be changed at runtime, though. >> >> >> Cheers >> Dan >> >> >> On Mon, Feb 23, 2015 at 7:23 PM, Sebastian Łaskawiec >> <[email protected]> wrote: >>> Hey! >>> >>> I've noticed an interesting question on StackOverflow [1]. Is it possible to >>> have 2 (or more) caches and associate database tables to specific caches? I >>> can even imagine this question in broader perspective - is it possible to >>> decide in the runtime, which cache should be used? >>> >>> After a short discussion with Sanne we couldn't find any solution. Does >>> anyone have any idea how to achieve this or maybe we have a "New Feature >>> Request" candidate? >>> >>> Thanks >>> Sebastian >>> >>> [1] >>> http://stackoverflow.com/questions/28668971/hibernate-different-caches-for-different-tables >>> >>> _______________________________________________ >>> infinispan-dev mailing list >>> [email protected] >>> https://lists.jboss.org/mailman/listinfo/infinispan-dev >> >> _______________________________________________ >> infinispan-dev mailing list >> [email protected] >> https://lists.jboss.org/mailman/listinfo/infinispan-dev > > _______________________________________________ > infinispan-dev mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/infinispan-dev -- Galder Zamarreño [email protected] _______________________________________________ infinispan-dev mailing list [email protected] https://lists.jboss.org/mailman/listinfo/infinispan-dev
