[keycloak-dev] investigating caching

Stian Thorgersen stian at redhat.com
Thu Jun 5 10:05:13 EDT 2014


Makes me wonder if we should extend the *Manager approach and only call the model through that. For example:

  RealmManager realmManager = ??
  UserManager user = realmManager.getUser(userId)


 

----- Original Message -----
> From: "Bill Burke" <bburke at redhat.com>
> To: keycloak-dev at lists.jboss.org
> Sent: Thursday, 5 June, 2014 1:51:47 PM
> Subject: [keycloak-dev] investigating caching
> 
> I think I have a decent way of doing caching, but it is going to take a
> refactoring of the Model API and KeycloakSession API so that caching can
> be layered (i.e. that we can cache realms/apps, but not cache users).
> For instance, the JPA adapter pretty much is hard-wired to have a loaded
> entity before it makes queries like "select user where user.realm = ?
> and user.name = ?".  We need to move things like user queries up to the
> KeycloakSession level so that we can use things like
> EntityManager.getReference() so that we're not making extra DB calls if
> we need to query a user.
> 
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev
> 


More information about the keycloak-dev mailing list