[jboss-user] [JBossCache] - Re: Caching data per user - multiple instances or not?
do-not-reply at jboss.com
Wed Mar 14 11:44:20 EDT 2007
"manik.surtani at jboss.com" wrote : Global instance, node per user.
Indeed, you definitely need to go with a global instance. The thing is that if you're using an EvictionPolicy, JbossCache will create a Timer thread for each instance. If you go with the instance per user idea you'll probably end up with a lot of threads in your system.
The disadvantage of the single instance is indeed that you need to clear the cache yourself when the user's session ends. Two ways to help with that is setting the time to live for each node programmatically to the same value as your session timeout and installing an HtppSessionListener that removes the entire user node at the sessionDestroyed event.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027991#4027991
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027991
More information about the jboss-user