cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <>
Subject RE: Antwort: RE: [RT]: Calculating the cache key
Date Tue, 28 May 2002 10:20:26 GMT

Volker Schmitt wrote:
> yes, HashTable/HashMap calls equal method to make sure that the search
> key-Object is the same than the stored key in the HashMap. If we have a
> Compound-Key you can implement the hashcode as a "sumary" or 
> "xor" of the single
> keys hashcode and implements the equal method as a compare of the 
> corresponding
> single keys, return true only if all keys are the same. The 
> benefit is that we
> do not need a String concat which generates additional Objects. 
Yes, thanks for the good idea. I will implement this today.

> I 
> think it also
> make sence to cache the hashcode of a key Object like it is done 
> in the String
> implementation (JDK > 1.2, Cocoon and JDK 1.2 will be much slower 
> than using
> 1.3), this will significant improve the performance if hashcode is called
> multible times.
Yes, will also be implemented today :)

> What is the reason using Serializable instead of Object ?

The generated response and the key are stored in the cache. This store
can be for example the file system, so it is required to serialize
the key and the data. This is much simpler if everything is already


To unsubscribe, e-mail:
For additional commands, email:

View raw message