jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gorman, Mitch " <mgor...@cbs.com>
Subject RE: JCS Query
Date Tue, 17 Jan 2006 13:14:45 GMT
	How are you storing it into the cache?  Are you doing something
like:

	for (int x=0; x < 10; x++) {
		JCS.put("key", new Integer(x));
	}

	Or are you doing:

	List l = new ArrayList();
	for (int x=0; x<10; x++) {
		l.add(new Integer(x));
	}
	JCS.put("key", l);

	If you want to cache a list... cache a list.  Repeatedly storing
values using the same key is only overwriting the value associated with that
single key, in the cache.  Keys must be unique.

-----Original Message-----
From: vivek dharuman [mailto:viveks08@rediffmail.com] 
Sent: Tuesday, January 17, 2006 4:50 AM
To: jcs-users@jakarta.apache.org
Subject: JCS Query

Hi,
    We had initially planned for a custom caching for my project. Suddenly
our client wants a standard tool for caching like JCS. We are nearing the
project release. I am new to JCS and also due to time factor, we have no
time to do R&D.I need some help regarding JCS.

- I am caching three objects.
- The first two are ok. Given a key, it'll return me a value for the key.
- But the third cache contains many values for a single key. I mean , i want
a list of values for a given key. How do i implement this with JCS.

  Tried using JCS.get()...but this gives me only one value for a key. I want
the whole list. Could anyone help me out with the cache.ccf configuration.
Could anyone explain with a complete example. Thanks in advance. 

Rgds,
vivek


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message