flask-cache
flask-cache copied to clipboard
Flask-Cache memoize make a lot of cache key in redis for same url and query string call
My project use Flask-Cache for some "high cost" report api based on Flask-Restful. Integration with Flask-Cache so simple but as the tittle "Flask-Cache memoize make a lot of cache key in redis for same url and query string call" Normally, Flask-Cache make 4-6 cache key before using the cache. Please help me resolve this problem. Thanks.
Here is more detail:
Note that Flask-Cache use diffrence cache keys to cache same content of same url and query string call.

https://www.evernote.com/shard/s326/sh/2b32e6de-15d7-4cb2-a736-e123e2271b29/e7430bb9dddfa38e78e5b09c3fd157bb
It looks like you are caching objects and they do not have a repr function defined that would allow flask-cache to convert the object to a string that would be common amongst different instances of flask.
See the warning in the following section: https://pythonhosted.org/Flask-Cache/#memoization