You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-users@jakarta.apache.org by Jack Gao <we...@hotmail.com> on 2004/01/08 01:20:11 UTC

Question about key object.

Hi, there

I'm pretty new with JCS, and I have some question about key object in JCS 
now.

I'm try to use my own object as key for JCS cache system. And this object 
declared as PrimaryKey interface, will generate dynamically. It's may 
include a ID, may include more complex properties.

But when I use this dynamic generated key object to retrieve object from 
cache, I can not get it, it just return me null. But I'm sure the object is 
in cache.

So I think maybe I need to write my own equals() and hashCode() method to 
make it force check if the keys are same. But even I overwrite equals() and 
hashCode(), it still can not found and these two method never been called.

Do I had to use exactlly same object as key to store and retrieve object to 
and from JCS cache system?

Thanks

Wei

_________________________________________________________________
Check your PC for viruses with the FREE McAfee online computer scan.  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-user-help@jakarta.apache.org


RE: cleaning the cache data

Posted by Aaron Smuts <aa...@wisc.edu>.
I suppose this is for emergency use.  One way is to build a simple page
that lists all the regions and has a link where you can call removeall.
There should be an example in the experimental codebase.  Other options
depend on your remote configuration.  

Aaron

> -----Original Message-----
> From: paulo caroli [mailto:pcaroli@corp.blah.com]
> Sent: Tuesday, January 13, 2004 4:34 PM
> To: 'Turbine JCS Users List'
> Subject: cleaning the cache data
> 
> Hi all,
> The infrastructure team of my project using JCS need to clean my JCS
cache
> using a simple clean command. a script or something that I can rely on
for
> cleaning all data in the cache.
> Did anyone have a similar situation?
> Which solution do you recommend?
> Thanks in advance,
> 
> Paulo
> 
> 
> 
> this message contains information that may be privileged and
confidential.
> unauthorized use, disclosure, dissemination and/or copying are
strictly
> prohibited. if you are not the intended recipient, please delete this
> message and any attachments and notify us immediately. please do not
copy
> this message or disclose its contents to anyone. thank you.
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-user-help@jakarta.apache.org


cleaning the cache data

Posted by paulo caroli <pc...@corp.blah.com>.
Hi all,
The infrastructure team of my project using JCS need to clean my JCS cache
using a simple clean command. a script or something that I can rely on for
cleaning all data in the cache.
Did anyone have a similar situation?
Which solution do you recommend?
Thanks in advance,

Paulo
 
 
 
this message contains information that may be privileged and confidential. unauthorized use, disclosure, dissemination and/or copying are strictly prohibited. if you are not the intended recipient, please delete this message and any attachments and notify us immediately. please do not copy this message or disclose its contents to anyone. thank you.
 
 
 

RE: Question about key object.

Posted by Aaron Smuts <aa...@wisc.edu>.
I'm not sure what the problem is exactly, but I don't recommend using
large objects as keys.  If you want to take advantage of the fastest way
to spool data on disk, then you would use the indexeddiskcache
auxiliary.  This puts the least recently used data on disk and keeps the
keys in memory.  Also, complex key comparisons could slow the entire
system down.  

Can you use a String as a key?  What exactly are you trying to do?

Aaron

> -----Original Message-----
> From: Jack Gao [mailto:weigao@hotmail.com]
> Sent: Wednesday, January 07, 2004 6:20 PM
> To: turbine-jcs-user@jakarta.apache.org
> Subject: Question about key object.
> 
> Hi, there
> 
> I'm pretty new with JCS, and I have some question about key object in
JCS
> now.
> 
> I'm try to use my own object as key for JCS cache system. And this
object
> declared as PrimaryKey interface, will generate dynamically. It's may
> include a ID, may include more complex properties.
> 
> But when I use this dynamic generated key object to retrieve object
from
> cache, I can not get it, it just return me null. But I'm sure the
object
> is
> in cache.
> 
> So I think maybe I need to write my own equals() and hashCode() method
to
> make it force check if the keys are same. But even I overwrite
equals()
> and
> hashCode(), it still can not found and these two method never been
called.
> 
> Do I had to use exactlly same object as key to store and retrieve
object
> to
> and from JCS cache system?
> 
> Thanks
> 
> Wei
> 
> _________________________________________________________________
> Check your PC for viruses with the FREE McAfee online computer scan.
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
turbine-jcs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
turbine-jcs-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-user-help@jakarta.apache.org