RSS: add a simple one-hour Cache-Control

This commit is contained in:
TheAMM 2017-05-16 15:59:03 +03:00
parent 99b59e57f5
commit dcad0572c5
1 changed files with 2 additions and 0 deletions

View File

@ -306,6 +306,8 @@ def render_rss(label, query, use_elastic):
torrent_query=query) torrent_query=query)
response = flask.make_response(rss_xml) response = flask.make_response(rss_xml)
response.headers['Content-Type'] = 'application/xml' response.headers['Content-Type'] = 'application/xml'
# Cache for an hour
response.headers['Cache-Control'] = 'max-age={}'.format(1*60*60)
return response return response