Add clear_cache cli command. fix #98

這個提交存在於:
Chase Sterling 2015-12-20 13:38:19 -05:00
父節點 9643f79de3
當前提交 98c3839168

檢視檔案

@ -1,4 +1,4 @@
from realms import config, create_app, db, __version__, flask_cli as cli
from realms import config, create_app, db, __version__, flask_cli as cli, cache
from realms.lib.util import random_string, in_virtualenv, green, yellow, red
from subprocess import call, Popen
from multiprocessing import cpu_count
@ -407,6 +407,15 @@ def drop_db():
db.metadata.drop_all(db.get_engine(app))
@cli.command()
def clear_cache():
""" Clears cache
"""
yellow("Clearing the cache")
with app.app_context():
cache.clear()
@cli.command()
def test():
""" Run tests