From 04431658597c9b9ae489be3363c6b9478d946fcd Mon Sep 17 00:00:00 2001 From: mjfernez Date: Sat, 16 Oct 2021 18:20:46 -0400 Subject: Turns off jinja caching. Fixes appropriate cache --- README.md | 3 +++ server.py | 2 +- siteconfig.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 38cf6d6..e376da9 100644 --- a/README.md +++ b/README.md @@ -182,8 +182,11 @@ based on the files in the site directory. You can omit files by adding them to the omit file from the perspective of the site dir. For example: + `thoughts/rants/dontread.txt` + or for files run under 'site' + `home.html` You can also make use of the Flask-Caching module to optimize your diff --git a/server.py b/server.py index c5522b9..14c4182 100644 --- a/server.py +++ b/server.py @@ -43,7 +43,7 @@ def setup(): {'COMPRESS_MIMETYPES': siteconfig.COMPRESS_MIMETYPES} ) app.config.update({'RSS_CHANNEL': get_rss_channel()}) - + app.config.update({'TEMPLATES_AUTO_RELOAD': True}) # Setup needs to come first to be compatible with wsgi setup() diff --git a/siteconfig.py b/siteconfig.py index f42875b..4c60674 100644 --- a/siteconfig.py +++ b/siteconfig.py @@ -51,7 +51,7 @@ class siteconfig: # https://flask-caching.readthedocs.io/en/latest/#configuring-flask-caching cache_config = { 'CACHE_TYPE': "SimpleCache", - 'CACHE_DEFAULT_TIMEOUT': 300, + 'CACHE_DEFAULT_TIMEOUT': 10, # You should only fill ONE of the sections below # uswgi 'CACHE_UWSGI_NAME': None, -- cgit v1.2.3