diff --git a/CHANGELOG.md b/CHANGELOG.md index 62c47500..296374d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,11 @@ About changelog [here](https://keepachangelog.com/en/1.0.0/) ## [x.x.x] ### Added ### Changed + - Changed cached method from simple to file system as it would be thread safe + ### Fixed -- Fixed max arg error when searching for some genes + - Fixed cache issue that could result in chromosome information not being updated + - Fixed max arg error when searching for some genes ## [2.1.1] ### Added diff --git a/gens/blueprints/gens/views.py b/gens/blueprints/gens/views.py index 2776e45b..d558329f 100644 --- a/gens/blueprints/gens/views.py +++ b/gens/blueprints/gens/views.py @@ -23,7 +23,6 @@ @gens_bp.route("/", methods=["GET"]) -@cache.cached(timeout=60) def display_case(sample_name): """ Renders the Gens template diff --git a/gens/cache.py b/gens/cache.py index 6efde991..dcf425fe 100644 --- a/gens/cache.py +++ b/gens/cache.py @@ -1,4 +1,6 @@ """Initiate cachig for app.""" from flask_caching import Cache +import tempfile -cache = Cache(config={"CACHE_TYPE": "simple"}) +tmp_dir = tempfile.TemporaryDirectory(prefix="gens_cache_") +cache = Cache(config={"CACHE_TYPE": "FileSystemCache", "CACHE_DIR": tmp_dir.name})