cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerhard Froehlich" <g-froehl...@gmx.de>
Subject RE: Caching and key collision?
Date Tue, 29 Jan 2002 23:49:36 GMT
Hi,

>From: Kuhnle@heinrich-partner.de [mailto:Kuhnle@heinrich-partner.de]
>
>Hi, 
>
>Thanks for the answers. JispFileSystemStore will do with the long file 
>names. But what about accidental key collision? This still can happen.
>
>----
>I noticed caching is done by generating a key with generateKey. This 
>returns a long, which is commonly generated through hashing. The 
>documentation says "This key must be unique inside the space of this 
>component", which hashing does not guarantee. Won't this lead the cache to 
>confusing two different cacheable objects (files/server pages/etc.) which 
>accidently have the same hash value? This sure is an unlikely event, but 
>ist still can happen.

I solved this problem once in a project using:
  java.rmi.server.UID

It generates a unique number! What do you think!

  Gerhard
 
--------------------------------------------------------------
By making things absolutely clear, people will become confused
--------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message