Skip to content
Snippets Groups Projects
Commit bf5170ea authored by Cédric Krier's avatar Cédric Krier :atom:
Browse files

Use global variable for cache timeout

parent 62967718
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,7 @@
NEWS_URL = 'https://discuss.tryton.org/c/news'
CALENDAR_URL = 'https://calendar.google.com/calendar/embed?src=p4jhgp9j5a2ehndebdglo6tslg%40group.calendar.google.com&ctz=Europe%2FBrussels'
CALENDAR_ICS = 'https://calendar.google.com/calendar/ical/p4jhgp9j5a2ehndebdglo6tslg%40group.calendar.google.com/public/basic.ics'
CACHE_TIMEOUT = 60 * 60
cache = Cache(config={'CACHE_TYPE': 'simple'})
app = Flask(__name__)
......@@ -25,7 +26,7 @@
@app.route('/')
@cache.cached(timeout=60 * 60)
@cache.cached(timeout=CACHE_TIMEOUT)
def index():
return render_template(
'index.html',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment