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
