Clear cache when releasing new version

This commit is contained in:
Gabriel Augendre 2019-06-08 19:30:34 +02:00
parent 48193b9f72
commit 26a8793a1f
2 changed files with 10 additions and 1 deletions

View file

@ -1,2 +1,2 @@
release: python manage.py migrate && python manage.py createcachetable release: python manage.py migrate && python manage.py createcachetable && python manage.py clearcache
web: gunicorn manuels_collection.wsgi --log-file - web: gunicorn manuels_collection.wsgi --log-file -

View file

@ -0,0 +1,9 @@
from django.core.cache import cache
from django.core.management import BaseCommand
class Command(BaseCommand):
help = 'Clears django cache'
def handle(self, *args, **options):
cache.clear()