1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-12-22 14:00:00 +00:00

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

View file

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