diff options
author | mjfernez <mjfernez@gmail.com> | 2021-10-16 18:20:46 -0400 |
---|---|---|
committer | mjfernez <mjfernez@gmail.com> | 2021-10-16 18:20:46 -0400 |
commit | 04431658597c9b9ae489be3363c6b9478d946fcd (patch) | |
tree | 60b2d14199805fe67cae2d0b543cf9aae211902e | |
parent | a7f3d566db39af447f45ba221427094e376ae076 (diff) | |
download | ezcms-04431658597c9b9ae489be3363c6b9478d946fcd.tar.gz |
Turns off jinja caching. Fixes appropriate cache
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | server.py | 2 | ||||
-rw-r--r-- | siteconfig.py | 2 |
3 files changed, 5 insertions, 2 deletions
@@ -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 @@ -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, |