hi,
I have a problem the second level caches :
- when I make my HQL requests the returned objects are put in the second level cache
- but if I clear all the caches :
Code:
Map<String, CollectionMetadata> roleMap = factory.getAllCollectionMetadata();
for (String roleName : roleMap.keySet()) {
factory.getCache().evictCollectionRegion(roleName);
}
Map<String, ClassMetadata> entityMap = factory.getAllClassMetadata();
for (String entityName : entityMap.keySet()) {
factory.getCache().evictEntityRegion(entityName);
}
factory.getCache().evictDefaultQueryRegion();
factory.getCache().evictQueryRegion(UpdateTimestampsCache.REGION_NAME);
factory.getCurrentSession().clear();
then HQL requests no longer puts the returned objects in cache...
thanks for your help!