Questions tagged [flask-caching]

52 questions
0
votes
1 answer

what is the REDIS_HOST In a docker container?

I want to use redis as cache server in Flask-caching, the config looks like this, cache = Cache(config={'CACHE_TYPE': 'redis', 'CACHE_REDIS_HOST': redis, 'CACHE_REDIS_PORT': 6379 …
Jayden
  • 61
  • 2
  • 5
-1
votes
0 answers

Is it possible to integrate `Flask-Smorest` and `Flask-Caching` for the purpose of caching requests?

I'd like to integrate both frameworks in my webapp. Flask-Smorest is used to define a RESTful API while Flask-Caching allows me to cache requests and specify duration and validity of the cache (whereas Flask-Smorest ETag doesn't seem to cover…
SkyWalker
  • 13,729
  • 18
  • 91
  • 187
-1
votes
1 answer

FileSystemCache missing after a few mins on flask server with multiple nginx workers

I am using a uwsgi-nginx based flask deployment (localhost) with a few worker processes(2 for now). Until now i had been using flask-Caching Simple Cache but recently i am in need of using a cache that would persist across processes. So i decided to…
-1
votes
1 answer

Importing a Flask extension in Quart using Blueprints

I am currently building a basic application in which I am carrying out measurements with a sensor connected to the hosting Raspberry Pi. To do so, I have decided to go for Quart, as it allows me to run them in the background. I am currently trying…
-1
votes
1 answer

Flask Endpoint returning 404 not found

I am experimenting with a Flask App to return some json data that is cached with Flask-caching. This end point works, as well as the flask-caching to cache the get_payload without having to re-run the function: @app.route('/payload/current',…
bbartling
  • 3,288
  • 9
  • 43
  • 88
-2
votes
1 answer

Call method once when Flask app started despite many Gunicorn workers

I have a simple Flask app that starts with Gunicorn which has 4 workers. I want to clear and warmup cache when server restarted. But when I do this inside create_app() method it is executing 4 times. def create_app(test_config=None): app =…
wowkin2
  • 5,895
  • 5
  • 23
  • 66
1 2 3
4