Facing Problem with hibernate-memcached executing more no of queries.

94 views
Skip to first unread message

Shaik

unread,
Jan 31, 2013, 5:43:56 AM1/31/13
to hibernate...@googlegroups.com
Hi,
     
      We are facing a problem with memcached. We are using hibernate-memcached-version1.5-SNAPSHOT and spymemcached-provider-version3.0.2. 
	  
The following are the configuration

persistence.xml
---------------

<!-- Enable 2nd Level Cache  -->
<property name="hibernate.cache.use_second_level_cache" value="true"/>
<property name="hibernate.cache.use_query_cache" value="true"/>
<!-- MemCache Configuration -->
<property name="hibernate.cache.region.factory_class" value="com.googlecode.hibernate.memcached.MemcachedRegionFactory"/>
<property name="hibernate.cache.use_minimal_puts" value="true"/>
<property name="hibernate.cache.use_structured_entries" value="true"/>
<property name="hibernate.memcached.servers" value="${hibernate.memcached.server.host.port}"/>
<property name="hibernate.memcached.cacheTimeSeconds" value="1800"/>

dto
----

@Cacheable(true)
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)

In GenericDao we are setting query hints cacheable to true for loadAll().

We are using loadAll() method to fetch all the records. 
Whenever we made a request the loadAll query is executing and also the queries based on id are executing.

Please let me know we are missing anything.

RayKrueger

unread,
Jan 31, 2013, 7:36:08 AM1/31/13
to hibernate...@googlegroups.com

We are using loadAll() method to fetch all the records. 
Whenever we made a request the loadAll query is executing and also the queries based on id are executing.

Some log details would help shed some light. Also, keep in mind that Hibernate and hibernate-memcached are both open source. Pull down the code and do some digging. You'll find a lot of really valuable information that way.
Reply all
Reply to author
Forward
0 new messages