Clear cache when releasing new version
This commit is contained in:
parent
48193b9f72
commit
26a8793a1f
2 changed files with 10 additions and 1 deletions
2
Procfile
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
Normal file
9
manuels/management/commands/clearcache.py
Normal 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()
|
Loading…
Reference in a new issue