cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: [c3] Conditional GET
Date Mon, 14 Dec 2009 07:55:48 GMT
Reinhard Pötz wrote:
> When coming back to my original question about the implementation
> conditional get support based on cache keys, the important part of your
> comments is that you suggest using a _strong_ hash key. Is there any
> concrete implementation that you can recommend? (regarding speed and
> potential collisions and of course distributed under some 'friendly'
> license)
>   

I've been using 64-bit FNV hash [1] for a similar purpose (computing an 
ETag for a full response in dynamic pages, see [2]). It's fast and was 
designed to have a low collision rate even for small changes in the 
input data.

There is a Java ASL-licensed implementation available at 
http://www.getopt.org/

I've also noticed a recent newcomer on the "hash scene", MurmurHash, 
that seems to have even better speed and non-collision than FNV. There's 
also an implementation at getopt.org.

Sylvain

[1] http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash
[2] http://bluxte.net/musings/2008/04/30/speeding-mobile-web-applications

-- 
Sylvain Wallez - http://bluxte.net


Mime
View raw message