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
Post a Comment