In some of my templates I'm using the {% cache %}
template tag to cache some parts, but for development I don't want anything to be cached. I tried using a settings variable to set cache expiring time to zero for dev in a separate settings file and have it called with a context_processor
, though it's not working.
Does anyone know a way to disable cache for dev environment?
Thanks for your help :)
You can use django dummy caching for development:
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
}
}
https://docs.djangoproject.com/en/dev/topics/cache/?from=olddocs/#dummy-caching-for-development
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With