mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2024-12-22 14:30:01 +00:00
RSS: add a simple one-hour Cache-Control
This commit is contained in:
parent
99b59e57f5
commit
dcad0572c5
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue