flask-cache

flask does not see change in .js file

flask does not see change in .js file Question: I made a change on one of the .js files that I use and no matter what I do, flask insists on picking up, from memory cache, the last version of the file, without the change. To clarify, I have the following structure. It all starts …

Total answers: 5

How do I work with cached values created by flask-cache

How do I work with cached values created by flask-cache Question: I’m using flask-cache in an app and trying to prepopulate the cache in a separate process. The problem is I can’t figure out the format the cached values are stored in. Looking at the cached values they look like they’ve been pickled, but the …

Total answers: 1

How to use Flask-Cache with Flask-Restful

How to use Flask-Cache with Flask-Restful Question: How do I use Flask-Cache @cache.cached() decorator with Flask-Restful? For example, I have a class Foo inherited from Resource, and Foo has get, post, put, and delete methods. How can I can invalidate cached results after a POST? @api.resource(‘/whatever’) class Foo(Resource): @cache.cached(timeout=10) def get(self): return expensive_db_operation() def post(self): …

Total answers: 6

How to cache SQL Alchemy calls with Flask-Cache and Redis?

How to cache SQL Alchemy calls with Flask-Cache and Redis? Question: I have a Flask app that takes parameters from a web form, queries a DB with SQL Alchemy and returns Jinja-generated HTML showing a table with the results. I want to cache the calls to the DB. I looked into Redis (Using redis as …

Total answers: 2