Fixed the cache key being a complex python object problem