On Wed, 30 Jan 2002, Gerhard Froehlich wrote:

> Hi,
>
> >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> >
> >Hi,
> >
> >Thanks for the answers. JispFileSystemStore will do with the long file
> >names. But what about accidental key collision? This still can happen.

But chances are very low as IIRC from a developers point of view a key
must be unique only withing a Component (FileGenerator,
XSLTTransformer, etc.) and not over the hole system. The cache itself
pre- or appends other values to form a system wide unique key for the
cache entry.

> >
> >----
> >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!

Isn't that damn slow?

Giacomo


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to