@Override
public void doAfterTransactionCompletion(boolean success, SessionImplementor session) throws HibernateException {
final EntityPersister persister = getPersister();
if ( success && isCachePutEnabled( persister, getSession() ) ) {
final CacheKey ck = getSession().generateCacheKey( getId(), persister.getIdentifierType(), persister.getRootEntityName() );
final boolean put = cacheAfterInsert( persister, ck );
if ( put && getSession().getFactory().getStatistics().isStatisticsEnabled() ) {
getSession().getFactory().getStatisticsImplementor()
.secondLevelCachePut( getPersister().getCacheAccessStrategy().getRegion().getName() );