Sure. Let me get this organized and i'll open a Jira ticket for it. On Thu, Oct 6, 2011 at 9:26 AM, Les Hazlewood-2 [via Shiro User] < [email protected]> wrote:
> Awesome - thanks for sharing! > > Is there any chance you could contribute the relevant code as a patch > to a Shiro Jira issue? This would be the easiest way to 1) keep track > of adding this as a feature and 2) accepting a code contribution. > > Regards, > > -- > Les Hazlewood > CTO, Katasoft | http://www.katasoft.com | 888.391.5282 > twitter: @lhazlewood | http://twitter.com/lhazlewood > katasoft blog: http://www.katasoft.com/blogs/lhazlewood > personal blog: http://leshazlewood.com > > > On Thu, Oct 6, 2011 at 12:21 AM, matan_a <[hidden > email]<http://user/SendEmail.jtp?type=node&node=6866484&i=0>> > wrote: > > > I got a version of this working and i thought i'd share what i have so > far: > > > > http://www.box.net/shared/rgjvtrxvn66jv8a1478u > > > > Basically, it's another DAO implementation (set your sessionManager to > use > > this version). The RequestCacheSessionDAO caches the session in the > > ThreadContext of the current request which is emptied out with everything > > > else at the end of the request. It greatly reduces the amount of times > the > > session is retrieved from the cache/backend storage. > > > > RequestCacheSessionDAO requires an implementation of > > RequestCacheSessionStore which is the actual class that would do the > > serialization and backend storage IO. > > > > I've included a MongoDB implementation of the Store and two > > CacheSerializers. JavaCacheSerializer is a plain vanilla Java > Serialization > > implementation. KryoCacheSerializer uses Kryo (see > > http://code.google.com/p/kryo/), which is quite a bit faster, but > requires > > you to register any special classes you dump in the session with the > > KryoCacheSerializer. > > > > I apologize for the messy code and the Spring references. I just pulled > it > > out and removed any proprietary info. Feel free to use/abuse/keep/delete > as > > you see fit. > > > > Cheers. > > > > > > -- > > View this message in context: > http://shiro-user.582556.n2.nabble.com/Cache-called-too-many-times-per-request-tp6851915p6864830.html > > > Sent from the Shiro User mailing list archive at Nabble.com. > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://shiro-user.582556.n2.nabble.com/Cache-called-too-many-times-per-request-tp6851915p6866484.html > To unsubscribe from Cache called too many times per request, click > here<http://shiro-user.582556.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=6851915&code=bWF0YW5AZW1hdGFuLmNvbXw2ODUxOTE1fDk2OTQ3MDg2Mg==>. > > -- View this message in context: http://shiro-user.582556.n2.nabble.com/Cache-called-too-many-times-per-request-tp6851915p6866616.html Sent from the Shiro User mailing list archive at Nabble.com.
