1

In my flask app, I used flask-caching to cache the query result as below:

@cache.memoize()
def load_user(user_id):
    return User.query.get(user_id)

But when I access my redis, the key is like flask_cache_L4kZRWHNrZYUZ8uyY7Mh0i. It's seem very hard to query the redis database to test. Because if I need the value of that key, I must be use the function cache.get(<key>) that in Flask-Caching API

So I want to ask wherether it has a way to find the key of return value of a function under decorator cache.memoize?

0 Answers0