below code is work absolutely fine , when i am using development server in my local machine , but when i tried to deploy this to azure app service it is not working . In Azure App service gunicorn is the server that we are using .
does Flask-Caching support gunicorn server ?
or is there way around to do this
from flask_caching import Cache
from flask import Flask
config = {
"DEBUG": True, # some Flask specific configs
"CACHE_TYPE": "filesystem", # Flask-Caching related configs
"CACHE_DEFAULT_TIMEOUT": 3600
}
app = Flask(__name__)
app.config.from_mapping(config)
cache = Cache(app)
@app.route('/getdata/<a>/<b>')
@cache.memoize(3600)
def getdata_(a,b):
result = "some function which output result"
return result