You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by NabbleSometimesSucks <bi...@yahoo.com> on 2013/03/14 21:20:54 UTC

Session and Cache management

I am using the DefaultWebSessionManagement and also a custom Cache
implementation that is storing the data in Redis. It uses the default
session validation executor. But I notice that I am still having lots of
data still sitting in Redis that isn't being deleted. I have tried to see
what is happening there, but couldn't figure out why it remains, even after
the validation period has expired.

What would I need to implement to get some automatic removal of old sessions
in my Cache. Hopefully something built in rather than having to do CRON.

I have been wondering how something like getActiveSessions(). How it would
actually work. Especially if I shutdown the server.

I really think it is the last part that causes all this lingering data. Is I
am testing and starting and shutting down Tomcat all the time. I guess I
could do a quick Listener that before the app is undeployed it calls
getActiveSessions() and makes sure they are all removed from the cache. 

What about having a time to live in the Redis entries for the Cache? But
that would need to be updated if they stay logged in and are doing things
for a while.

Thanks

Mark



--
View this message in context: http://shiro-user.582556.n2.nabble.com/Session-and-Cache-management-tp7578398.html
Sent from the Shiro User mailing list archive at Nabble.com.