Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix caching to prevent displaying the wrong variant #150

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ 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 cache issue that could result in chromosome information not being updated

## [2.1.1]
### Added
Expand Down
1 change: 0 additions & 1 deletion gens/blueprints/gens/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@


@gens_bp.route("/<path:sample_name>", methods=["GET"])
@cache.cached(timeout=60)
def display_case(sample_name):
"""
Renders the Gens template
Expand Down
2 changes: 1 addition & 1 deletion gens/cache.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Initiate cachig for app."""
from flask_caching import Cache

cache = Cache(config={"CACHE_TYPE": "simple"})
cache = Cache(config={"CACHE_TYPE": "FileSystemCache", "CACHE_DIR": "/tmp"})

Check warning on line 4 in gens/cache.py

View check run for this annotation

codefactor.io / CodeFactor

gens/cache.py#L4

Probable insecure usage of temp file/directory. (B108)
mhkc marked this conversation as resolved.
Show resolved Hide resolved
Loading