2

I want to configure Hibernate's second level cache to use AWS Elasticache (currently trying to use memcached). I've looked at things like this, but can't seem to get it to work.

In the Hibernate 5.0 docs, it says that Wildfly automatically configures Hibernate's second level cache to use Inifinispan. Is there an easy way to disable this? Does configuring the cache to use elasticache (correctly) override this?

How can I configure the cache to use memcached in Hibernate 5? Several places say to set the property "hibernate.cache.provider_class" but the Hibernate 5.0 docs say that the property "hibernate.cache.region.factory_class" needs to be set to determine which provider to use. Also are old versions of hibernate-memcached (like this) still usable?

Community
  • 1
  • 1
helik
  • 21
  • 3
  • What's the reason why you want to avoid using default Infinispan 2LC provider in Wildfly? :) – Galder Zamarreño Aug 31 '16 at 10:56
  • 1
    We have multiple servers that we want to access the same cache so we don't get stale data -- hence the use for elasticache – helik Aug 31 '16 at 20:59
  • If those servers deploy the same version of the code, specially when it comes to the Hibernate/JPA classes, you could cluster those servers and take advantage of Infinispan-based distributed 2LC... – Galder Zamarreño Sep 05 '16 at 15:18

0 Answers0