Skip to Content.
Sympa Menu

grouper-users - [grouper-users] RE: Grouper web service caching

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] RE: Grouper web service caching

Chronological Thread 
  • From: Chris Hyzer <>
  • To: "Doppala, Karthik" <>
  • Cc: "" <>
  • Subject: [grouper-users] RE: Grouper web service caching
  • Date: Tue, 1 Oct 2013 01:18:04 +0000
  • Accept-language: en-US

The caching in Grouper needs more documentation and tuning around use cases.  Also, we could put high level caches in the WS as you suggest.  The key would be the input to the WS, and the authenticated user, and the output is whatever the output is.  Then if you want to cache hasMember, or whatever, you could do that pretty easily.


Right now most of the hibernate methods do have caches.  getMember WS calls Hib3MembershipDAO.findAllByGroupOwnerAndMemberAndField() which has this:


    Set<Object[]> mships = HibernateSession.byHqlStatic()




      .setString( "owner",  ownerGroupId              )

      .setString( "member", memberUUID             )

      .setString( "fuuid",  f.getUuid()            )



And the KLASS in this case is: edu.internet2.middleware.grouper.internal.dao.hib3.Hib3MembershipDAO


So in the ehcache file, if you set this:


  <cache  name="edu.internet2.middleware.grouper.internal.dao.hib3.Hib3MembershipDAO"









Then the hasMember will essentially be set for 1 minute.  I say essentially because there might be group lookups or other queries going on (privileges?)  I don’t know until I profile that call.  But there could be other side effects like that method in the API might be used by other things that make things work.  Like an operation that makes an update and reads it, and expects it not to be cached, it could be broken.


Anyways, like I said, a more useful WS caching strategy would cache the operation at a higher level, and might even let the caller have input.  i.e. you could cache hasMember for 1 minute by default, but some callers might want 10 minute caching, and some might want no caching…


Well, at this point, people might as well chime in as to what caching they would like to see and we can see what we can do.


At Penn we cache on the client side so we haven’t really needed server side caching, but if you think that is not convenient or for whatever reason let us know J







From: Doppala, Karthik [mailto:]
Sent: Monday, September 30, 2013 8:54 PM
To: Chris Hyzer
Subject: Grouper web service caching


Hi Chris,

I was wondering if grouper-ws uses caching internally, I do see that it does have ehcache configured but the ehcache.xml file is not really referenced in the file. If it does, where does it cache ? Your response is appreciated





Archive powered by MHonArc 2.6.16.

Top of Page