Hi,
We are facing problem in Second Level cache. We have observed that whenever below query gets fire, all the elements in Second Level Cache of all the regions get evicted. Total size & elements become zero.
String sql = "delete from EmployeeContactRelationship ecr where ecr.teamID in(:teamIDList) and ecr.contactID in(:contactIDList)";
Query query = sessionFactory.getCurrentSession().createQuery( sql );
query.setParameterList("teamIDList", teamIDList);
query.setParameterList("contactIDList", contactIDList);
query.executeUpdate();
Please let me know if anybody has faced this kind of problem. What could be the other reasons of loosing elements in Second Level Cache.
Regards,
Sourabh
|