2 Replies Latest reply on Jul 14, 2010 3:48 AM by michal_szymanski

    How to store information about tokens in JBoss Cache?

    michal_szymanski

      Hi,

      We have following problem. We have one node in Jboss Cache to store tokens (used for authorization)  , each token can have a different expiration date.

      I have a feeling that keeping all tokens in one node is not best solution because eviction algorithm works per node basis in our example we would like to use LRUAlgorithm but we cannot use it because as I wrote before all element are in one node (eviction works per-node basis ).

       

      The second solution is to store each token in separate node but in such solution we can have 50000 nodes with one element ! I'm affraid that finding a token (=finding a node instead element) an be very slow because we will look for node instead of element also creating node as I know is not fast operation but in this solution we have to create node each time when token is created.

       

      What is proper solution for our problem? It is a pitty that there is now eviction per element basis

       

      Michal Szymanski