use of org.eclipse.persistence.jpa.JpaCache in project cuba by cuba-platform.
the class OrmCacheSupport method evictEntity.
private void evictEntity(Object entity) {
if (entity != null && !PersistenceHelper.isNew(entity)) {
EntityManagerFactory emf = persistence.getEntityManager().getDelegate().getEntityManagerFactory();
JpaCache cache = (JpaCache) emf.getCache();
cache.evict(entity, true);
}
}
Aggregations