How do I disable Django per-view caching when debug is on? -


i've written bunch of views in django use per-page caching. code looks this:

from django.http import httpresponse django.views.decorators.cache import cache_page  @cache_page(60 * 5) def view_page(request):     return httpresponse('hello world') 

this works wonderfully, pain during testing. how caching debug off?

check out django's dummy cache backend. development enviroment should set cache backend django.core.cache.backends.dummy.dummycache


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -