How to properly configure Play Framework to use memcached for query cache? Connected to memcached but hibernate still using Ehcache

272 views
Skip to first unread message

Roman

unread,
Aug 14, 2012, 2:33:23 AM8/14/12
to hibernate...@googlegroups.com
Hello,

Anyone ever configured Play framework to use Memcached for Jpa cache?

my application.conf looks like this:

hibernate.cache.provider_class=com.googlecode.hibernate.memcached.MemcachedCacheProvider

hibernate.cache.region.factory_class=net.sf.ehcache.hibernate.EhCacheRegionFactory
hibernate.memcached.servers=127.0.0.1:11211
hibernate.memcached.cacheTimeSeconds=300
hibernate.cache.use_second_level_cache=true
hibernate.cache.use_query_cache=true
hibernate.generate_statistics=true
hibernate.cache.use_structured_entries=true

Memecached service is running with 2GB of memory allocated but only 2MB is used.

When applicaiton starts I see the following:

13:39:11,894 INFO ~ Connected to memcached
13:39:12,121 INFO ~ Connected to jdbc:postgresql://localhost/comdb
13:39:13,183 WARN ~ Couldn't find a specific ehcache configuration for cache named [item_instance]; using defaults.
13:39:13,259 WARN ~ Couldn't find a specific ehcache configuration for cache named [models.items.Item]; using defaults.

1. Wy it gives me warnings about Ehcache if I configured it to use memcached class?
2. There's no memcached region factory class so I have to use
hibernate.cache.region.factory_class=net.sf.ehcache.hibernate.EhCacheRegionFactory
Is that correct?

Thanks.

Reply all
Reply to author
Forward
0 new messages