aboutsummaryrefslogtreecommitdiff
path: root/uploader/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'uploader/__init__.py')
-rw-r--r--uploader/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/uploader/__init__.py b/uploader/__init__.py
index cae531b..4f3538c 100644
--- a/uploader/__init__.py
+++ b/uploader/__init__.py
@@ -6,6 +6,7 @@ from pathlib import Path
from flask import Flask, request
from flask_session import Session
+from cachelib import FileSystemCache
from uploader.oauth2.client import user_logged_in, authserver_authorise_uri
@@ -69,6 +70,11 @@ def create_app():
# Silently ignore secrets if the file does not exist.
app.config.from_pyfile(secretsfile)
+ app.config["SESSION_CACHELIB"] = FileSystemCache(
+ cache_dir=Path(app.config["SESSION_FILESYSTEM_CACHE_PATH"]).absolute(),
+ threshold=int(app.config["SESSION_FILESYSTEM_CACHE_THRESHOLD"]),
+ default_timeout=int(app.config["SESSION_FILESYSTEM_CACHE_TIMEOUT"]))
+
setup_logging(app)
# setup jinja2 symbols