Fixed entity view cache evict

This commit is contained in:
Volodymyr Babak 2018-10-20 13:14:42 +03:00
parent 78436f9baa
commit 39e6b904c1

View File

@ -91,9 +91,6 @@ public class EntityViewServiceImpl extends AbstractEntityService implements Enti
@Autowired @Autowired
private CustomerDao customerDao; private CustomerDao customerDao;
@Autowired
private AttributesService attributesService;
@Autowired @Autowired
private CacheManager cacheManager; private CacheManager cacheManager;
@ -108,6 +105,7 @@ public class EntityViewServiceImpl extends AbstractEntityService implements Enti
return savedEntityView; return savedEntityView;
} }
@CacheEvict(cacheNames = ENTITY_VIEW_CACHE, key = "{#entityViewId}")
@Override @Override
public EntityView assignEntityViewToCustomer(EntityViewId entityViewId, CustomerId customerId) { public EntityView assignEntityViewToCustomer(EntityViewId entityViewId, CustomerId customerId) {
EntityView entityView = findEntityViewById(entityViewId); EntityView entityView = findEntityViewById(entityViewId);