mirror of
https://github.com/simon987/nyaa.git
synced 2025-04-20 18:56:43 +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…
x
Reference in New Issue
Block a user