srikotesh
asked on
how to disable hibernate query cache
HI Experts,
I Want to disable query cache in my project.
In Hibernate configuration file i made it as
<prop key="hibernate.cache.use_q uery_cache ">false</p rop>
is it enough to disable or in query level i have to set as false
can some one suggest me.
how to test query cache is disabled.
Thanks,
I Want to disable query cache in my project.
In Hibernate configuration file i made it as
<prop key="hibernate.cache.use_q
is it enough to disable or in query level i have to set as false
public List<Object> findByHql(final String hqlQuery) {
HibernateCallback<Object> hibernateCallback = new HibernateCallback<Object>() {
public List<Object> doInHibernate(Session session) {
Query hibernateQuery = session.createQuery(hqlQuery);
return hibernateQuery.setCacheable(true).list(); ///here also i need to set cacheable as false or not
}
};
List<Object> list = (List<Object>) getHibernateTemplate().execute(hibernateCallback);
}
can some one suggest me.
how to test query cache is disabled.
Thanks,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER