diff --git a/Procfile b/Procfile index 96f4482..c9ff064 100644 --- a/Procfile +++ b/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 - diff --git a/manuels/management/commands/clearcache.py b/manuels/management/commands/clearcache.py new file mode 100644 index 0000000..c1f0595 --- /dev/null +++ b/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()