Add clear_cache cli command. fix #98

Esse commit está contido em:
Chase Sterling 2015-12-20 13:38:19 -05:00
commit 98c3839168
1 arquivos alterados com 10 adições e 1 exclusões

Ver arquivo

@ -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