Invalidating cache for findByowner

This commit is contained in:
Pedro Igor 2017-05-12 10:23:54 -03:00
parent aaddb035a8
commit 7569493b17

View file

@ -55,6 +55,8 @@ public class CachedResourceStore extends AbstractCachedStore implements Resource
addInvalidation(getCacheKeyForResource(resource.getId()));
addInvalidation(getCacheKeyForResourceName(resource.getName()));
addInvalidation(getCacheKeyForOwner(owner));
getCachedStoreFactory().getPolicyStore().addInvalidations(resource);
getTransaction().whenRollback(() -> removeCachedEntry(resourceServer.getId(), getCacheKeyForResource(resource.getId())));