Improve somewhat effective method cache hash function.