rm cache.py, no longer needed
parent
490d18c7c8
commit
3e2590090d
13
cache.py
13
cache.py
|
@ -1,13 +0,0 @@
|
|||
from app import app
|
||||
from flask import g
|
||||
import redis
|
||||
|
||||
@app.before_request
|
||||
def before_request():
|
||||
g.redis = redis.StrictRedis(host='localhost', port=6379, db=0)
|
||||
|
||||
@app.teardown_request
|
||||
def teardown_request(exc):
|
||||
cache = getattr(g, 'redis', None)
|
||||
if cache is not None:
|
||||
cache.connection_pool.close()
|
Loading…
Reference in New Issue