On 24 Feb 2015, at 13:23, Sanne Grinovero
<sanne(a)infinispan.org> wrote:
Interesting, so it seems it's possible to configure a specific cache
for a specific entity?
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.
^ That's because this is an Infinispan specific detail and hence it's defined in
the Infinispan 2LC configuration section, in the Infinispan user documentation.
On 24 February 2015 at 12:13, Dan Berindei <dan.berindei(a)gmail.com> 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_con...
>
>> 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
> <sebastian.laskawiec(a)gmail.com> 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-fo...
>>
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/infinispan-dev
_______________________________________________
infinispan-dev mailing list
infinispan-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev
--
Galder Zamarreño
galder(a)redhat.com