[jboss-user] [JBoss Cache] - How to use JBoss Cache

Michal Szymanski do-not-reply at jboss.com
Tue Jun 15 02:23:34 EDT 2010


Michal Szymanski [http://community.jboss.org/people/michal_szymanski] created the discussion

"How to use JBoss Cache"

To view the discussion, visit: http://community.jboss.org/message/547973#547973

--------------------------------------------------------------
Hi
I'm new to Jboss Cache and I have few very basic questions. In our system we would like store information about tokens (used for authentcation of request) in Cache. Simply first external request will create token after uthentcaton  in cache and next requests will be validated against token (we wll check if given token exists in cache).
First question is, should we create one node e.g. /tokens and put all tokens (key=token string, value=some accoutn info) to this node? I've found in documentation that

+"One purpose of grouping cache data into separate nodes is to minimize  transaction  locking interference, and increase concurrency.  So for example, when  multiple threads or  possibly distributed caches are acccessing different accounts  simultaneously."+

Should we create our tokens between different nodes to reduce problem with concurrency? How many nodes we should create? We expect that we wll have about few thousend of token in cache in peak hours.

Second questions is if we get object from cache (using get() method) can we change values of object not related to key? Do we get copy of object or reference. in documentation is information:

+The  data access methods are similar to the collections  http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html?is-external=true Map interface,  but some are read-only or return copies of the underlying the data'+

but I could not found what 'some' methods, there is no info about 'get' method.

Michal Szymanski
 http://blog.szymanskich.net http://blog.szymanskich.net
 http://techblog.freeconet.pl http://techblog.freeconet.pl

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/547973#547973]

Start a new discussion in JBoss Cache at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2052]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100615/cfb98473/attachment.html 


More information about the jboss-user mailing list