Commit 5e1dc840 authored by nanahira's avatar nanahira

add session redis configuration

parent 73a8b435
......@@ -23,6 +23,7 @@ client = MongoClient(host=config.MONGO['host'])
app.secret_key = config.SECRET_KEY
app.config['SESSION_TYPE'] = 'redis'
app.config['SESSION_REDIS'] = config.SESSION_REDIS
app.cache = Cache(app, config=config.REDIS)
sess = Session()
sess.init_app(app)
......
......@@ -22,7 +22,7 @@ MONGO = {
'database': 'taiko'
}
# Redis server settings, used for sessions + cache.
# Redis server settings, used for cache.
REDIS = {
'CACHE_TYPE': 'redis',
'CACHE_REDIS_HOST': '127.0.0.1',
......@@ -31,6 +31,9 @@ REDIS = {
'CACHE_REDIS_DB': None
}
# Redis server url for session.
SESSION_REDIS = 'redis://localhost:6379'
# Secret key used for sessions.
SECRET_KEY = 'change-me'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment