diff --git a/cache/cache.py b/cache/cache.py new file mode 100644 index 0000000..1f3be24 --- /dev/null +++ b/cache/cache.py @@ -0,0 +1,2 @@ +from flask_caching import Cache +cache = Cache() \ No newline at end of file diff --git a/web.py b/web.py index 90dc8f5..b4e3f8a 100755 --- a/web.py +++ b/web.py @@ -1,22 +1,22 @@ from flask import Flask, send_from_directory -from flask_caching import Cache import sentry_sdk import json +from cache.cache import cache app = Flask(__name__) try: from threads.threads import threads app.register_blueprint(threads, url_prefix='/threads') + print(' * Threads blueprint registered') except ImportError: - print(' ! threads blueprint missing') + print(' ! Threads blueprint not found') app.config.from_file("config.json", load=json.load) # caching -cache = Cache() -cache.init_app(app) print(' * Cache type: ' + app.config["CACHE_TYPE"]) +cache.init_app(app) # perf monitoring & error tracking sentry_config = app.config["SENTRY"]