From 43e114b82500476fa81754bf099ad25ee945201e Mon Sep 17 00:00:00 2001 From: mjfernez Date: Sun, 20 Feb 2022 14:29:37 -0500 Subject: Add caching fix from mjfer.net branch --- views.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/views.py b/views.py index 3393cb2..7b12e35 100644 --- a/views.py +++ b/views.py @@ -99,7 +99,6 @@ def render_file(path): @app.route("/raw/") -@cache.cached() def send_file_from_site(path): """ send_file_from_site - instead of rendering a file within a template @@ -115,7 +114,6 @@ def send_file_from_site(path): @app.route("/static/") -@cache.cached() def send_file_from_static(path): """ send_file_from_static - send files from the static directory @@ -130,7 +128,6 @@ def send_file_from_static(path): @app.route("/feed.xml") -@cache.cached() def render_rss_feed(): context = { 'config': siteconfig.rss_channel_config, @@ -138,5 +135,7 @@ def render_rss_feed(): } feed = render_template("feed.xml", **context) response = make_response(feed) - response.headers['Content-Type'] = siteconfig.MIMETYPES.get(".xml") + response.headers['Content-Type'] = str( + siteconfig.MIMETYPES.get(".xml") + ) return response -- cgit v1.2.3