From dcad0572c551f63615738bb6136b44d4b4932e46 Mon Sep 17 00:00:00 2001 From: TheAMM Date: Tue, 16 May 2017 15:59:03 +0300 Subject: [PATCH] RSS: add a simple one-hour Cache-Control --- nyaa/routes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nyaa/routes.py b/nyaa/routes.py index 48c8428..dbf8123 100644 --- a/nyaa/routes.py +++ b/nyaa/routes.py @@ -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