MessageCache: derive the hash from the cache contents