Create method to generate cache key