[keycloak-dev] Issue with CacheModel

Bill Burke bburke at redhat.com
Tue Jul 15 10:43:17 EDT 2014


Ooops.  Good catch.

On 7/15/2014 8:38 AM, Marek Posolda wrote:
> Hi,
>
> During export/import I may want to remove some data (like realm) and
> overwrite it with imported one. But actually I have some issues during
> testing and looks like it's caused by the fact that not all the data are
> properly invalidated during removal of entities.
>
> For example when removing realm, there is just realm itself marked for
> invalidation
> https://github.com/keycloak/keycloak/blob/master/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/DefaultCacheModelProvider.java#L268
> . Actually with JPA model, the call to  getDelegate().removeRealm(id)
> also seems to invalidate application and application roles (due to the
> call to getApplicationById() which uses CacheModel) but realm roles,
> oauth clients and users are not invalidated. For Mongo model, there are
> no data invalidated at all.
>
> Question is if CacheModelProvider should rely on ModelProvider to
> invalidate cached data during getDelegate().removeRealm ? Shouldn't it
> be the responsibility of CacheModelProvider itself to find all cached
> data related to particular realm (in this case all applications, oauth
> clients, realm roles, app roles, users) and invalidate them?
>
> Marek
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev
>

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com


More information about the keycloak-dev mailing list