Thanks for the explanation!

Thanks
Sebastian

śr., 25 lut 2015 o 14:01 użytkownik Galder Zamarreño <galder@redhat.com> napisał:

> On 23 Feb 2015, at 18:23, Sebastian Łaskawiec <sebastian.laskawiec@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?

By default, each entity and collection is stored in its own cache. These caches are configured from a template cache. For entities, the template cache configuration is "entity" and for collections, "collection".

It is possible that users might want to use different cache configuration per entity and/or collection, e.g. for different expiration, lifespan settings and other potential changes. The most common thing to tweak is expiration, which is why we made these specific expiration changes easy to do.

However, if you want to change other things, like lifespan or max idle settings, you need to define your own cache configuration and then assign the cache name to the entity that you want.

All of this is explained in http://infinispan.org/docs/7.1.x/user_guide/user_guide.html#_advanced_configuration_2, including the different tweaks required in the property names when running inside Wildfly or EAP.

Cheers,

>
> Thanks
> Sebastian
>
> [1] http://stackoverflow.com/questions/28668971/hibernate-different-caches-for-different-tables
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


--
Galder Zamarreño
galder@redhat.com





_______________________________________________
infinispan-dev mailing list
infinispan-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev