Fixed hashing functions for cache key.