List of usage examples for org.hibernate Cache evictEntityRegions
@Deprecated default void evictEntityRegions()
From source file:org.ow2.bonita.util.DbTool.java
License:Open Source License
public static void cleanCache(final String domain, final String sessionFactoryName) throws Exception { // clean 2nd level cache: final SessionFactoryImplementor sessionFactory = getSessionFactory(domain, sessionFactoryName); if (sessionFactory != null) { Cache cache = sessionFactory.getCache(); if (cache != null) { cache.evictDefaultQueryRegion(); cache.evictQueryRegions();//from www . j a v a 2 s . c o m cache.evictCollectionRegions(); cache.evictEntityRegions(); } } }