From f7668243b7a55d1f69d508b3baaf891055715f63 Mon Sep 17 00:00:00 2001 From: mjfernez Date: Sun, 10 Oct 2021 23:05:07 -0400 Subject: Improve README. Expanded cache config This commit removes a lot of unnecessary rambling from the README and also makes it easier to use more complex cache options if you want to --- siteconfig.py | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'siteconfig.py') diff --git a/siteconfig.py b/siteconfig.py index 4e0ef90..412dfce 100644 --- a/siteconfig.py +++ b/siteconfig.py @@ -39,7 +39,29 @@ class siteconfig: # Option for Flask Caching # https://flask-caching.readthedocs.io/en/latest/#configuring-flask-caching - CACHE_TYPE = "SimpleCache" - - # Time in seconds that your files stay cached for - CACHE_DEFAULT_TIMEOUT = 300 + cache_config = { + 'CACHE_TYPE' : "SimpleCache", + 'CACHE_DEFAULT_TIMEOUT' : 300, + # You should only fill ONE of the sections below + # uswgi + 'CACHE_UWSGI_NAME' : None, + ## + # memcache + 'CACHE_MEMCACHED_SERVERS' : None, + 'CACHE_MEMCACHED_USERNAME' : None, + 'CACHE_MEMCACHED_PASSWORD' : None, + ## + # redis + 'CACHE_REDIS_HOST' : None, + 'CACHE_REDIS_PORT' : None, + 'CACHE_REDIS_PASSWORD' : None, + 'CACHE_REDIS_DB' : None, + 'CACHE_REDIS_URL' : None, + 'CACHE_REDIS_SENTINELS' : None, + 'CACHE_REDIS_SENTINEL_MASTER' : None, + 'CACHE_REDIS_CLUSTER' : None, + ## + # filesystem + 'CACHE_DIR' : None, + # add more options as needed from the URL above + } -- cgit v1.2.3