From 7569493b177881b91fc88964099bb29b22d1c141 Mon Sep 17 00:00:00 2001 From: Pedro Igor Date: Fri, 12 May 2017 10:23:54 -0300 Subject: [PATCH] Invalidating cache for findByowner --- .../models/authorization/infinispan/CachedResourceStore.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/model/infinispan/src/main/java/org/keycloak/models/authorization/infinispan/CachedResourceStore.java b/model/infinispan/src/main/java/org/keycloak/models/authorization/infinispan/CachedResourceStore.java index d94ccd8a4c..bc892d0e51 100644 --- a/model/infinispan/src/main/java/org/keycloak/models/authorization/infinispan/CachedResourceStore.java +++ b/model/infinispan/src/main/java/org/keycloak/models/authorization/infinispan/CachedResourceStore.java @@ -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())));