mirror of
https://github.com/FAUSheppy/python-flask-picture-factory
synced 2025-12-06 15:11:36 +01:00
add default cache
This commit is contained in:
@@ -104,6 +104,8 @@ def sendPicture(path):
|
|||||||
cacheTimeout = flask.request.args.get("ct")
|
cacheTimeout = flask.request.args.get("ct")
|
||||||
if cacheTimeout:
|
if cacheTimeout:
|
||||||
response.headers['Cache-Control'] = "max-age=" + str(cacheTimeout)
|
response.headers['Cache-Control'] = "max-age=" + str(cacheTimeout)
|
||||||
|
else:
|
||||||
|
response.headers['Cache-Control'] = "max-age=" + "3600"
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user