[jboss-user] [JBoss Cache: Core Edition] - Caching collection of items

janbols do-not-reply at jboss.com
Mon Oct 13 03:40:30 EDT 2008


Hi,
if we want to cache a collection of a couple of 100's of objects in jBossCache, what would be the best thing to do in terms of performance:

  | * Put the entire list under in the map of a node in the cache. E.g. cache.put(fqn, "myList", list);This means each time an item is added to the collection, the entire collection needs to be replicated, right?
  | * Create an entry in the map of a node for each item in the collection. E.g. forEach listItem in list: 
  |   |     cache.put(fqn, listItemKey, listItem);This way only the added or removed item in the list is replicated, right?
  | * Use the POJO edition that proxies the collection and automatically takes care of adding and removing items to the collection.
  | 
Thanks.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4181765#4181765

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4181765



More information about the jboss-user mailing list