Browse Source

Clear cache when releasing new version

master
Gabriel Augendre 2 years ago
parent
commit
26a8793a1f
  1. 2
      Procfile
  2. 9
      manuels/management/commands/clearcache.py

2
Procfile

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

9
manuels/management/commands/clearcache.py

@ -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()
Loading…
Cancel
Save