-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I think it could be resolved too adding just a HashMap as value in cache
E.g:
HashMap<String,String> person1 = new HashMap<String, String>();
person1.put("name","Samuel");
person1.put("country","Brazil");
cache.put("key1",person1);
Or I'm think wrong in this case?
cheers!
P.S. - I terminate development an Adapter to integrate Infinispan with
JBoss ESB... it's hosted by google code at project breakingwoods
Samuel de Lima Tauil
JBoss Instructor / Consultant
Red Hat Inc.
Tel: +55 11 3524 6102
Cel: +55 11 8996 4194
On 19 May 2010, at 17:35, Sanne Grinovero wrote:
> Is this covering a different use case than having two caches k1 and k2 equally
configured?
> My current app Scarlet is dynamically creating many different caches using the
configuration names asd templates, I'm happy with that.
>
>
Slightly different. Scoping could be useful for use cases where creating a cache per
scope is too expensive. E.g., I want to cache a person's name, address and
photograph. I could do this:
cache.put("person1_name", name);
cache.put("person1_address", address);
cache.put("person1_pic", pic);
cache.put("person2_name", name);
cache.put("person2_address", address);
cache.put("person2_pic", pic);
cache.put("person3_name", name);
cache.put("person3_address", address);
cache.put("person3_pic", pic);
and every time I need to retrieve anything I need to concatenate person_id with the
"field" I am interested in. It would be too expensive to create a separate
cache per person, as the system may have thousands of users.
>
>> Il giorno 19/mag/2010 16:43, "Manik Surtani" <manik(a)jboss.org> ha
scritto:
>>
>>
>> On 13 Apr 2010, at 11:01, Manik Surtani wrote:
>>
>>>
>>
>>> On 13 Apr 2010, at 10:50, Sanne Grinovero wrote:
>>>
>>>> rightfull concern, I wouldn't personally ha...
>>
>> Here is an alternative - *do* we want to support scoping? By this, I mean:
>>
>> cache.withAffinityKey("k1").put("name", "Manik");
>> cache.withAffinityKey("k1").put("country", "UK");
>>
>> cache.withAffinityKey("k2").put("name", "Sanne");
>> cache.withAffinityKey("k2").put("country", "IT");
>>
>> will be allowed and the two will not overwrite each other, *but* you cannot
retrieve stuff by simply doing:
>>
>> cache.get("name") anymore. You would have to do:
>>
>> cache.withAffinityKey("k1").get("name"). Simply doing a
cache.get("name") will return a null.
>>
>> What do people prefer?
>>
>> Cheers
>> Manik
>>
>> --
>> Manik Surtani
>> manik(a)jboss.org
>> Lead, Infinispan
>> Lead, JBoss Cache
>>
http://www.infinispan.org
>> http:...
>>
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/infinispan-dev
--
Manik Surtani
manik(a)jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org
_______________________________________________
infinispan-dev mailing list
infinispan-dev(a)lists.jboss.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iQEcBAEBAgAGBQJL9TN4AAoJEEULrVvD5zAEqNMH/1DJzB5TcUnOi20GWjDgbAuR
MMjLc+UIMSihC9SG38kMPIDYiPP/trR8GIuZS9X8o0bx4mo2HzO+e/QZYxRhkOrj
Vh/wEeZqcMt6wh4bFrpaqzBEnxzesmEXFGSMZZBD3XfuR98G5Um+iuM81zXcbRHT
YVeK/PJv6qrJ/GWJmCrifAQIhPZlnk9NBhUzA8X52AuEvH19769lhGnOo4tQRFlx
B0S+qbmSKwPTdf6GaNd20RnWCdmvFAQnYICFR1F6FSa6d+Qc9sWjYBHJh/Y1qaR7
ZS6xjNAqXZoYgus5yUvJ05pulDY8v52kHxkrM6NoPt59FmzUxlw5W/74zlYLbCU=
=oJvm
-----END PGP SIGNATURE-----