Convert the cache key into a smart str before calculating the md5 hash.