cocoon-dev mailing list archives

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

Volker Schmitt wrote:
> Hi,
> the current Interface of CacheableProcessingComponent:
> <snip>
> why not using Object as a return value of "generateKey" ? I think 
> this is more
> flexible and allows the implementation of Compound keys.
Yes, I thought about this over the weekend, too. Object as the return
value is the most flexible.

But when using Object the caching algorithm is required to build
compound objects (arrays etc.) and cannot use simple string operations 
for building the compound key anymore. (Or the Object must implement
a reliable toString() method)

While building a compound object with for example an array is a simple
solution, I see currently a problem in storing this into the cache.
The cache can for example be implemented as a hash table, so the
compound key object must somehow implement hashCode() and equals().
While equals() can be easily implemented, I see no good solution for
Do you know a solution for this?


Carsten Ziegeler     Chief Architect     Open Source Group, S&N AG
             Cocoon Consulting, Training and Projects

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

View raw message