major changes:

- introduce flask cache
- use replaceAll together with encodeURI component on client
- many more
This commit is contained in:
geoffrey45
2021-12-19 13:27:37 +03:00
parent 831b8e7ee2
commit 7e67b819f0
8 changed files with 78 additions and 43 deletions
+11
View File
@@ -1,11 +1,22 @@
from flask import Flask
from flask_cors import CORS
from flask_caching import Cache
config = {
"CACHE_TYPE": "SimpleCache",
"CACHE_DEFAULT_TIMEOUT": 300
}
cache = Cache(config = config)
def create_app():
app = Flask(__name__)
CORS(app)
app.config.from_mapping(config)
cache.init_app(app)
from . import api
app.register_blueprint(api.bp, url_prefix='/')