diff options
| author | user <user@node5.net> | 2024-06-08 23:36:19 +0200 |
|---|---|---|
| committer | user <user@node5.net> | 2024-06-08 23:36:19 +0200 |
| commit | d0d41ec564f815365337a236d0ca36695dbd97b7 (patch) | |
| tree | 9d68c940d7405327cef88f46b8a2eef69fed732a | |
| parent | eb4f8240bd5e6fcfe6662ad419711620964e4352 (diff) | |
Revert "cache slow json data"
This reverts commit eb4f8240bd5e6fcfe6662ad419711620964e4352.
Didn't take URL arg into account
| -rw-r--r-- | requirements.txt | 3 | ||||
| -rw-r--r-- | src/map_node5_net.py | 7 |
2 files changed, 1 insertions, 9 deletions
diff --git a/requirements.txt b/requirements.txt index 1690951..b20b2d8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,4 @@ Flask~=3.0 PyYAML~=6.0 psycopg~=3.1 -uWSGI~=2.0 -Flask-Caching~=2.3
\ No newline at end of file +uWSGI~=2.0
\ No newline at end of file diff --git a/src/map_node5_net.py b/src/map_node5_net.py index 1d67111..b8a2d9a 100644 --- a/src/map_node5_net.py +++ b/src/map_node5_net.py @@ -2,16 +2,11 @@ import json import os import flask -import flask_caching import db_handler -cache = flask_caching.Cache(config={'CACHE_TYPE': 'SimpleCache', 'CACHE_DEFAULT_TIMEOUT': 60 * 60 * 24 * 365.25}) - app = flask.Flask(__name__, template_folder='templates', static_folder='static', static_url_path='') -cache.init_app(app) - @app.route("/") def index(): @@ -37,9 +32,7 @@ def categories(): categories = db_handler.categories return categories - @app.route("/all.json") -@cache.cached() def all(): category_RADIOACTIVE = flask.request.args.get('Category') # User input is RADIOACTIVE rows = db_handler.get_all(category_RADIOACTIVE) |
