Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
import org.infinispan.protostream.annotations.ProtoTypeId;
import org.keycloak.marshalling.Marshalling;
import org.keycloak.models.cache.infinispan.RealmCacheManager;
import org.keycloak.models.cache.infinispan.UserCacheManager;

@ProtoTypeId(Marshalling.CACHE_KEY_INVALIDATION_EVENT)
public class CacheKeyInvalidatedEvent extends InvalidationEvent implements RealmCacheInvalidationEvent {
public class CacheKeyInvalidatedEvent extends InvalidationEvent implements RealmCacheInvalidationEvent, UserCacheInvalidationEvent {

@ProtoFactory
public CacheKeyInvalidatedEvent(String id) {
Expand All @@ -36,4 +37,9 @@ public CacheKeyInvalidatedEvent(String id) {
public void addInvalidations(RealmCacheManager realmCache, Set<String> invalidations) {
realmCache.invalidateCacheKey(getId(), invalidations);
}

@Override
public void addInvalidations(UserCacheManager userCache, Set<String> invalidations) {
userCache.invalidateCacheKey(getId(), invalidations);
}
}